simov / markdown-viewer

Markdown Viewer / Browser Extension
MIT License
1.01k stars 131 forks source link

Documents not rendered if they start with HTML comment #209

Open EuropeanDeveloper opened 1 year ago

EuropeanDeveloper commented 1 year ago

Documents are not rendered if they start with HTML comment.

Example:

<!-- HTML comment -->

# Lorem Ipsum

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor
incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis
nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.

Result:

screenshot

Version: Markdown Viewer 5.1 Browser: Mozilla Firefox 111.0

simov commented 1 year ago

I'm not able to reproduce it on my end. I tried with both compilers and using different option combinations. Not sure what else can be different.

EuropeanDeveloper commented 1 year ago

I used the default settings. Still, the HTML_Comment_Test.md file is not rendered.

simov commented 1 year ago

It works both on file:/// and http://localhost on my end, MV 5.1 and FF 111 on Linux.

EuropeanDeveloper commented 1 year ago

I've tried it on Windows 11, maybe is it because of that?

simov commented 1 year ago

That's even more strange, the web rendering part of Firefox should behave the same on all platforms.

tcouey commented 5 days ago

I also have this issue. For example:

# July 3, 2024 (Wednesday)
<title>July 3, 2024 (Wednesday)</title>

works okay, but:

<title>July 3, 2024 (Wednesday)</title>
# July 3, 2024 (Wednesday)

does not.

This is in Firefox 127.0.2.