I was editing something in the Chart.js documentation (the mcve part) when a link wasn't displayed as it should be in the markdown preview.
While trying to fix this issue, I noticed that the <hr>
written in the line above was triggering it.
The issue is reproducible on every anchor.
A quick fix is to add a new line between the <hr>
and the link (as here).
This issue seems to exist with several HTML elements (not all of them though) :
<hr>
, as stated above.<br>
, as shown here<h1>
, as shown here. Note that the issue is not reproducible with the<h2>
though.<table>
, as shown here, which, of course, cannot be tested on other SO markdowns editors.- ... maybe more, I haven't tested them all
As Mike ans Squidward said in the comments, all of these HTML elements have markdown equivalents (# _
for <h1>_</h1>
, ---
for <hr>
, etc.).
However, these markdown equivalents don't seem to trigger the issue.
But I am not looking for making these HTML elements work.
The thing is, since it works with the plain HTML on other markdown editors on SO, I wondered if everything is fine about it (and if I should have expected the result I had in the docs), or if it is a bug.
<hr>
valid? Shouldn't it be<hr />
? Hmm based on this I wouldn't say so ... inconsistent it is .../
in empty tags was only needed in XHTML - HTML doesn't require it.<br>
...<br>
in Documentation, at least for the preview.a__\nb
=>a<br>b
(replace_
with space, comments are broken). Though I'd say that<br>
should almost never be used. Paragraphs are preffered.<br>
, I've been trying to beat it out of my developers for years :).