Horizontal rules breaking parsing
-
Correct behaviour
Markup:
So what *should* you do? **Party!** [link](http://example.net) `Some inline code`
Result:
So what should you do?
Party!
link
Some inline code
#### Markup:Incorrect behaviour (simply added <hr> before)
<hr> So what *should* you do? **Party!** [link](http://example.net) `Some inline code`
Result:
So what *should* you do? **Party!** [link](http://example.net) `Some inline code`
This bug doesn't manifest if you replace <hr> with other tags (tested with <a>, <blockquote>, <pre>, <q>, <div>).Note
Adding two line breaks after the <hr> also prevents the bug.
-
The bug also doesn't happen if the
<hr>
is within a BBcode tag:####Markup:
@Some Guy said:<blockquote><hr> This is a text. [This is a link](www.thedailywtf.com)</blockquote>
####Result:
@Some Guy said:
This is a text.
This is a link
-
Reported to discoursebugs.com:
https://bitbucket.org/masamunewos/discoursebugs/issue/91/horizontal-rules-break-parsing-of
Edit: you'll have to excuse the bad formatting in that bug report. Looks like bitbucket doesn't like blockquotes. Also there is no such bug over there either.
Also, thanks @Matches for volunteering to create an actual bugtracker. Hope you haven't regretted it much.
-
Oh god, this is just outright insane:
####Markup:
<hr /> This is a text. [This is a link](www.thedailywtf.com)
####Result:
This is a text. [This is a link](www.thedailywtf.com)vs.
####Markup:
<hr/> This is a text. [This is a link](www.thedailywtf.com)
####Result:
This is a text. [This is a link](www.thedailywtf.com)Yes, adding a space inside an
<hr/>
breaks links.
-
BBCode also fixes XHTML tags:
####Markup:
@Some Guy said:<blockquote><hr /> This is a text. [This is a link](www.thedailywtf.com)</blockquote>
####Result:
@Some Guy said:
This is a text.
This is a link
-
It's apparently an interesting edge case.
Filed under: [WONTFIX](#tag)
-
B-but that still doesn't explain the total and utter WTFERY that their XHTML parsing is.
Filed under: [Their Standardextensiblecommonhyperbbgundiscotextmarkupupdowndownleftrightleftrightbastartcodinglanguagehorrorsuperparser sucks.]()
-
B-but that still doesn't explain the total and utter WTFERY that their XHTML parsing is.
I'm not quite convinced that either of the words "XHTML" or "parsing" apply in this context.
Filed under: regex munging
-
I've been surrounding reports in code backticks, seems to work reasonably well in most cases. I haven't been able to handle these in a few days, I'll get back to it soon but I'm trying to close a deal at work.
-
Before someone gets pedantic on me, I realize
(simply added <hr> before)
is a lie: there is a missing line break before**Party!**
. Doesn't affect the bug however.
-
-
http://www.urbandictionary.com/define.php?term=munging
For the record, I've never heard/seen that term used outside of computing (http://en.wikipedia.org/wiki/Mung_(computer_term)).
Guess I'll be a bit more careful with its use in the future.
-
I still think Urban Dictionary's version is a better description of how the parser operates.
And yes, thanks to UD, that word is ruined for me.
-
-