diff --git a/src/compiler/api/GF/Server/PGFService.hs b/src/compiler/api/GF/Server/PGFService.hs index 9fe00963c..80ef0dc34 100644 --- a/src/compiler/api/GF/Server/PGFService.hs +++ b/src/compiler/api/GF/Server/PGFService.hs @@ -144,7 +144,7 @@ pgfCommand qsem command q (t,pgf) = -- Without caching parse results: parse' cat start mlimit ((from,concr),input) = - case PGF2.parse concr cat (init input) of + case PGF2.parse concr cat input of ParseOk ts -> return (Right (maybe id take mlimit (drop start ts))) ParseFailed _ tok -> return (Left tok) ParseIncomplete -> return (Left "")