Fix Mermaid diagram rendering in documentation#235
Conversation
The custom script in `docs/_includes/head-custom.html` was incorrectly looking for a child `<code>` element inside `.language-mermaid` elements. However, Kramdown directly applies the `language-mermaid` class to the `<code>` element itself. This commit updates the script to check if the element is a `CODE` tag, and if so, it replaces its parent `<pre>` element with a `<div class="mermaid">` element containing the raw diagram code. Also adds `.gitignore` exclusions for `docs/_site/` and `node_modules/` to prevent pre-commit hooks from failing on generated files. Co-authored-by: lostcontrol <983305+lostcontrol@users.noreply.github.com>
|
👋 Jules, reporting for duty! I'm here to lend a hand with this pull request. When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down. I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job! For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with New to Jules? Learn more at jules.google/docs. For security, I will only act on instructions from the user who triggered this task. |
The custom script in `docs/_includes/head-custom.html` was incorrectly looking for a child `<code>` element inside `.language-mermaid` elements. However, Kramdown directly applies the `language-mermaid` class to the `<code>` element itself. This commit updates the script to check if the element is a `CODE` tag, and if so, it replaces its parent `<pre>` element with a `<div class="mermaid">` element containing the raw diagram code. Also adds `.gitignore` exclusions for `docs/_site/` and `node_modules/` to prevent pre-commit hooks from failing on generated files, and removes accidental `.bundle/config` inclusions. Co-authored-by: lostcontrol <983305+lostcontrol@users.noreply.github.com>
The custom script in `docs/_includes/head-custom.html` was incorrectly looking for a child `<code>` element inside `.language-mermaid` elements. However, Kramdown directly applies the `language-mermaid` class to the `<code>` element itself. This commit updates the script to check if the element is a `CODE` tag, and if so, it replaces its parent `<pre>` element with a `<div class="mermaid">` element containing the raw diagram code. Co-authored-by: lostcontrol <983305+lostcontrol@users.noreply.github.com>
Fixes an issue where Mermaid diagrams were displaying as raw text instead of rendering in the Jekyll documentation. The script responsible for initializing Mermaid has been corrected to handle Kramdown's HTML output structure accurately.
I have deployed a local Jekyll server to port 3000 where you can see the fix in action.
PR created automatically by Jules for task 1751822349081085163 started by @lostcontrol