-
-
Notifications
You must be signed in to change notification settings - Fork 7.4k
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
Error when JSON fenced code block contains shortcode call #12567
Comments
Perhaps we can just have separate syntax validator tool, instead of whole server routine |
There's nothing invalid about the unclosed fenced code blocks that you described in the original forum topic. It may not be what you intend, but the markdown itself is valid. Perhaps you can find a linter that warns you about unclosed fenced code blocks, but the best known linter (markdownlint) does not have this capability. See: This issue is not related to unclosed fenced code blocks in any way. |
Ok, as I understand this syntax is correct:
The issue is that Hugo just throws Maybe I can just write Java application which can find all such specific patterns and report... with IDE, I am more or less successful and fast using search for "json" in files; but initially I was doing "binary search" to find why it fails, removing half of files then starting server until I find suspect. I didn't see such issue with other patterns such as "mermaid"; only with "json". |
That's why the issue title is:
It is specific to fenced code blocks where the language portion of the info string is "JSON". |
Reference: https://discourse.gohugo.io/t/panic-with-json-and-workaround-but-better-to-fix-it/50137/9
markdown
error
The problem seems to be limited to the JSON hiighlighting language. I tested about 20 other languages, including some likely suspects, but was unable to reproduce the problem.
This isn’t a problem if you call the shortcode using the
{{% %}}
notation. The shortcode template itself is irrelevant.It looks like we started throwing this error in v0.111.0 and later, but as far as I can tell this combination has never worked.
Low priority.
The text was updated successfully, but these errors were encountered: