From d5e8b69b7083d44c2df7a21907c32f5dc4d1db83 Mon Sep 17 00:00:00 2001 From: redxef Date: Wed, 18 Dec 2024 00:55:36 +0100 Subject: [PATCH] fix: parsing when closing parentheses is has a space before it. --- Jellyfin.Plugin.SmartPlaylist/Lisp/Compiler/Parser.cs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Jellyfin.Plugin.SmartPlaylist/Lisp/Compiler/Parser.cs b/Jellyfin.Plugin.SmartPlaylist/Lisp/Compiler/Parser.cs index 97e6918..80a20ae 100644 --- a/Jellyfin.Plugin.SmartPlaylist/Lisp/Compiler/Parser.cs +++ b/Jellyfin.Plugin.SmartPlaylist/Lisp/Compiler/Parser.cs @@ -77,6 +77,13 @@ namespace Jellyfin.Plugin.SmartPlaylist.Lisp.Compiler { _sts.Commit(); break; } + if (t is SpaceToken) { + // need this here because those tokens can never + // return an expression and trying to parse the last + // expression will not work if its only spaces and a + // closing parentheses. + continue; + } _sts.Rewind(1); expressions.Add(parse()); }