Skip to content
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

markdown-viewer generates <pre><code> incorrectly from Markdown causing HTML-style comments to be displayed as though in code blocks #262

Open
wnm3 opened this issue Jan 6, 2025 · 2 comments

Comments

@wnm3
Copy link

wnm3 commented Jan 6, 2025

I have generated markdown and depending on whether I view it in the markdown-viewer or the MMDComposer5 the comments toward the end of the document in the various lists either displays as code blocks in the markdown-viewer, or don't display in MMDComposer5, respectively.

I believe the markdown-viewer plugin has become confused and introduced <pre><code> tags in the HTML it generates.

The purpose of these comments is to act as clues for LLMs to know where lists have been created and how they are indented.

Do you think this is a bug in the markdown-viewer?

I've attached a zip with the markdown and html used to produce it with the following content:

unzip -v codesmpl.zip
Archive:  codesmpl.zip
 Length   Method    Size  Cmpr    Date    Time   CRC-32   Name
--------  ------  ------- ---- ---------- ----- --------  ----
   19828  Defl:N     6521  67% 01-06-2025 13:19 474bb0eb  codesmpl_000001.md
   74497  Defl:N    14464  81% 01-06-2025 13:19 47589428  codesmpl_000001.html
--------          -------  ---                            -------
   94325            20985  78%                            2 files

codesmpl.zip

@wnm3
Copy link
Author

wnm3 commented Jan 6, 2025

The left view is markdown-viewer, the right is MMDComposer5:
image

@wnm3
Copy link
Author

wnm3 commented Jan 6, 2025

In the image below, the markdown we generated is on the left, the display in Chrome is in the middle, and the HTML that the markdown-viewer generated is on the right. Notice the introduction of <pre><code> tags added by the markdown-viewer:

image

@wnm3 wnm3 changed the title Should HTML-style comments be displayed in code blocks? markdown-viewer generates <pre><code> incorrectly from Markdown causing HTML-style comments to be displayed as though in code blocks Jan 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant