Formatting bugs with intervals and hyperlinks
-
Repro:
Start with a list of bracketed intervals
[0, 1) (0 ,1) [0 ,1] (0, 1]
Using the CtrlL keyboard shortcut on each line, link each to (for convenience) http://<num> with <num> indicating which line it is.
[\[0, 1)][1] [(0, 1)][2] [\[0, 1\]][3] [(0, 1\]][4] [1]: http://1 [2]: http://2 [3]: http://3 [4]: http://4
Note that the escapes were provided by the editor, not me.
Expected result:
[0, 1)
(0 ,1)
[0 ,1]
(0, 1]Actual result:
[0, 1)
[(0, 1)][5]
[[0, 1]][6]
(0, 1]Problem found when attempting to link the first option on this poll to http://en.wikipedia.org/wiki/Bracket_(mathematics)#Intervals
Further bug: - footnotes/URL's in code blocks aren't ignored, when they should be, when adding further links. I've no idea what's going to happen when I press submit here. Screenshot of what I did submit....
-
WONTFIX, by design: Discourse's markdown parser is actually a social experiment to see how much bullshit users are willing to put up with.
Filed under: Well, I guess that might be Discourse's core mission.
-
[a]: http://example.com [b]: http://example.com [c]: http://example.com [d]: http://example.com
Let's see:
I suspect many, many Markdown engines are going to fail at that in Babelmark.
Workaround #1:
<a href="http://a">[0, 1)</a> <a href="http://b">(0 ,1)</a> <a href="http://c">[0 ,1]</a> <a href="http://d">(0, 1]</a>
Workaround #2 (close, but no cigar)
[\[0, 1)](http://a) [(0, 1)](http://b) [\[0, 1\]](http://c) [(0, 1\]](http://d)
-
Workaround #1:
Well, quite. How do you think I got my "expected" exemplar to work/display as wanted?
-
I suspect many, many Markdown engines are going to fail at that in Babelmark.
Not too many, actually:
(the passing groups start with showdown, lunamark, and Blackfriday)
-
start with
That doesn't really give any useful information since the parsers are all run at once and the results are shown as they come in.
Edit:
[What happens if you put them in a different order?][wat]
[wat]: http://johnmacfarlane.net/babelmark2/?normalize=1&text=[\[0%2C+1)%5D%5Ba%5D%0A%5B(0%2C+1%5C%5D%5D%5Bd%5D%0A%5B(0%2C+1)%5D%5Bb%5D%0A%5B%5C%5B0%2C+1%5C%5D%5D%5Bc%5D%0A%0A++%5Ba%5D%3A+http%3A%2F%2Fexample.com%2Fa%0A++%5Bb%5D%3A+http%3A%2F%2Fexample.com%2Fb%0A++%5Bc%5D%3A+http%3A%2F%2Fexample.com%2Fc%0A++%5Bd%5D%3A+http%3A%2F%2Fexample.com%2Fd