-
Notifications
You must be signed in to change notification settings - Fork 28
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 files starting with a HTML tag do not get rendered on Windows #58
Comments
Hi @heronils the file seems to render fine for me. Can you specify how you access the file? In particular there is a known bug in firefox due to which navigating to a local file by clicking links to it causes the add-on not to render the file (see #45). This also affects Gitlab Markdown Viewer. Where you’re on the non-rendered page, can you try re-loading it by copying the url pasting it into a address bar (F5 will not work)? Or from the directory view, copy the link to the file (right click > copy link location) and paste the address in the directory bar, instead of clicking the link directly. |
I just found out that it seems to be the first line, the image. If i remove that, it will render. So this does not render (i can see the three hashes):
But this does render (it gets expanded to a h3 heading):
The Gitlab viewer renders both. Can you reproduce this? |
I just see the Gitlab viewer also has some delay, it first shows it like in the screenshot, then, after three seconds it reloads the page and renders it. |
I can also reproduce the behaviour when navigating to it by clicking a link. Both dont render it. It only gets rendered in the Gitlab viewer when i open the file by clicking it in the file manager (md_auto_file → open is assigned to |
This again works fine for me, on FF 66.0.5 64-bit on linux. We’ll need some more info to troubleshoot:
|
Setup is Windows 7, Firefox 67.0.1 (64-Bit), other addons disabled. I found that it seems to be related to the encoding. Tested with Notepad++. Only if the markdown is UTF 8 BOM encoded it gets correctly rendered. Not with other encodings. When the encoding is other than UTF 8 BOM Firefox warns about the missing encoding declaration in the console. The detailed behaviour: 1 – Addon enabled (other addons disabled): 1.1 – Saved as UTF 8 BOM: The Markdown document gets correctly rendered, the type is text/plain, Firefox assumes UTF 8 as encoding. The formatted HTML is
1.2 – Saved with ANSI or UTF 8 no BOM: The markdown gets rendered like in my screenshot, the type is text/html, Firefox assumes UTF 8 as encoding. The HTML is exactly
2 – All Addons disabled: 2.1 – Encoding is UTF 8 BOM: Firefox shows the markdown as it is written, the type is text/plain, Firefox assumes UTF 8 as encoding, the source code is like the one you gave in your previous post (just in german). 2.2 – Encoding is UTF 8, no BOM: Firefox behaves like in 1.2 |
Seems to be a firefox bug, like many of the quirks we get from |
No problem, for me personally that resolves the issue. |
Actually this bug is marked resolved in Firefox 66. With 67.0.1 you should not be affected. |
I just tested it on my Windows 7 Firefox 67.0.4 x64. The behaviour is still identical to my above report. |
I can reproduce this with Firefox 67.0.4 (64 bits) on Windows 10. The page is correctly decoded as UTF-8 in both cases, however in one case (no BOM) the add-on is not rendering the page. It seems that if the first non-whitespace (and non-BOM) character is a valid tag (here |
The default way of opening a local file in v2 (#99) : opening |
Hi, thanks for the addon.
It does not render this file: https://github.com/snabbdom/snabbdom/blob/master/README.md when downloaded and then opened from within the file manager.
I guess that is because the file is huge. Smaller files get rendered without problems.
BTW, the Gitlab Markdown viewer correctly renders it.
The text was updated successfully, but these errors were encountered: