[Bug] parse length limit exceeded on versions >= 10.15.0
ashishkeshan opened this issue · 2 comments
Hello! I noticed a bug with liquidjs when trying to upgrade from 10.14.0 -> 10.15.0. One of my CI tests has started failing with an AssertionError: parse length limit exceeded
. I know that the file I'm parsing is definitely under the parse length limit, so I believe there is some sort of bug introduced by the new optionality to set a parse limit.
Here is a test repo where I have been able to reproduce the bug: https://github.com/ashishkeshan/liquidjs-render-bug
If someone could take a look at the repo and help me debug the issue, I would greatly appreciate it!
The error can be reproduced by passing an object instead of a string to liquid.parse()
.
import { Liquid } from "liquidjs";
const liquid = new Liquid();
liquid.parse({});
// AssertionError: parse length limit exceeded
In your test repo, for some iterations, toLint[key]
is not a string.
Thanks for the help! Looks like that was the fix I needed for my project. I'll still keep this open because I was not receiving an exception in earlier versions of LiquidJS, so I think something about error handling changed in the library.