ckeditor / github-writer

GitHub Writer - WYSIWYG Rich-Text Editor for GitHub, powered by CKEditor.
https://ckeditor.com/
Other
379 stars 61 forks source link

Mermaid Diagrams Not Correctly Rendering Inline Markdown Formatting #472

Open ranggakd opened 10 months ago

ranggakd commented 10 months ago

πŸ“ Provide detailed reproduction steps (if any)

  1. Create a new markdown file or open an existing one in your repository.
  2. Add the following Mermaid code block:
    ```mermaid
    %%{init: {"flowchart": {"htmlLabels": false}} }%%
    flowchart LR
        markdown["`This **is** _Markdown_`"]
        newLines["`Line1
        Line 2
        Line 3`"]
        markdown --> newLines
  3. Commit and push the changes to the repository.
  4. Open the markdown file in the GitHub web interface.

βœ”οΈ Expected result

The Mermaid diagram should be correctly rendered with the inline markdown formatting inside the nodes.

expected result

❌ Actual result

The Mermaid diagram is not correctly rendered when using inline markdown formatting. The markdown syntax inside the nodes is displayed as plain text.

actual result

%%{init: {"flowchart": {"htmlLabels": false}} }%%
flowchart LR
    markdown["`This **is** _Markdown_`"]
    newLines["`Line1
    Line 2
    Line 3`"]
    markdown --> newLines

❓ Possible Solution

There may be an issue with how GitHub's markdown renderer handles inline markdowns inside Mermaid diagrams. A possible solution could be to update the renderer to parse and display the inline markdown inside Mermaid diagrams correctly.

πŸ“ƒ Other details