-
Notifications
You must be signed in to change notification settings - Fork 154
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Strings starting with "{%" inside code blocks are parsed as unclosed Markdoc, clogging builds #72
Comments
By default, the Markdoc parser attempts to parse Markdoc tags that appear inside of fenced code blocks. This behavior can be disabled individually per fenced code block by putting a
We probably ought to add a global configuration option for this so that it doesn't need to be set individually for each fence. |
That would be great! I would also vote for making process=false the default. |
|
I had some Liquid template code I needed to render as a code block and given the similarities of Liquid and Markdoc, the page wasn't rendering (non-closed tags and many other issues as expected). I tried the I managed to fix the issue by using the Markdoc's own Doc repository and the Your milage may vary, but it worked for me. |
What happened?
I've been migrating our website to Markdoc. We use a bit of an esoteric programming language that does use
{%term}
format at times. When runningnext build
, on the build would halt on one of 5 pages and my node would gradually use 12GB of RAM until my system froze.Deleting files and escaping the Markdown render I've nailed it down to pages that have strings that start with
{%
inside a code block. Examples:If I delete these lines from all these files, the build runs fine. If I retain even one, it goes into its death spiral.
To reproduce
Place one of those strings on a page. Should be enough. It looks like the Markdoc website wraps examples in a custom tag — was this an intentional workaround? We can do similar ...
Version
0.1.2
Additional context
No response
The text was updated successfully, but these errors were encountered: