Syntax Error Due to Incorrect Generated HTML File
See original GitHub issueNot sure if this issue is being faced by me or others as well. Mermaid diagrams won’t render for me no matter what - I checked my formatting, syntax, etc, but kept getting the Syntax Error image.
After checking the generated HTML files, I saw the HTML code was generated as follows.
<pre><code class="mermaid">graph TD
A[Client] --> B[Load Balancer]
B --> C[Server01]
B --> D[Server02]
</code></pre>
As you can see, it shows up as <code> ... </code>
. I manually changed it to <div>...</div>
and the diagrams generated just fine.
<pre><div class="mermaid">graph TD
A[Client] --> B[Load Balancer]
B --> C[Server01]
B --> D[Server02]
</div></pre>
Running mkdocs build
reverts it back to code and so syntax errors start occurring again.
Attaching my yml file for reference:
site_name: My Documentation
nav:
- Home: index.md
- Modules: modules.md
theme: readthedocs
plugins:
- search
- mermaid2
extra_javascript:
- https://unpkg.com/mermaid/dist/mermaid.min.js
markdown_extensions:
- admonition
Issue Analytics
- State:
- Created 3 years ago
- Comments:39 (16 by maintainers)
Top Results From Across the Web
HTML code generates syntax error but still works
An iframe is supposed to have a src attribute, and the content of that URL will be rendered into the <iframe> element. The...
Read more >How to check for errors in HTML ? - GeeksforGeeks
Syntax error : Incorrect syntax leading to compile time error in other languages.HTML have no affect of syntax error. Logical error: Syntax ...
Read more >Invalid Syntax in Python: Common Reasons for SyntaxError
If the interpreter can't parse your Python code successfully, then this means that you used invalid syntax somewhere in your code. The interpreter...
Read more >Debugging HTML - Learn web development | MDN
HTML itself doesn't suffer from syntax errors because browsers parse it permissively, meaning that the page still displays even if there are ...
Read more >Error Explanations for The W3C Markup Validation Service
This error may appear if you are using a bad syntax for your comments, such as "<!invalid comment>" The proper syntax for comments...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@kerrerain I checked it with YOUR code - and - bam - error
checked MkDocs.yml file tataaa: found the problem
try this:
IMPORTANT Your have to install before:
pip install mkdocs-material
and than :
This is understood: I will close this issue because the immediate concern (“bug”) was solved by a workaround (use superfences + custom fences).
I opened an new issue (#16) for the enhancement request (to make the default configuration work with most themes).