Underscores in linked text can cause markdown bug


(Alexander) #1

In a RubyRogues Parley thread, a user posted a link to a URL with a bunch of underscores, and noted that it didn’t render properly.

From playing with it here a bit, it looks like putting one or more underscores in the linked text can cause a bunch of weird rendering decisions. If there are underscores around the link itself, it gets weird too.


Underscore in URL link causes markdown problem
(Bill Ayakatubby) #2

Some of your URLs are invalid. Underscores and spaces aren’t allowed in domain names. That doesn’t apparently invalidate your test results, but I wanted to be clear.

Here’s the code I used:

* [one _ underscore](http://no.underscores/foobarxyz)
* [one _ underscore](http://one.underscore/foo_barxyz)
* [one _ underscore](http://two.underscores/foo_bar_xyz)
* [_ two _ underscores](http://no.underscore/foobarxyz)
* [_ two _ underscores](http://one.underscore/foo_barxyz)
* [_ two _ underscores](http://two.underscores/foo_bar_xyz)
* before _ one [one _ underscore](http://no.underscores/foobarxyz)
* before _ one [ two _ under_score](http://no.underscores/foobarxyz)

(Jeff Atwood) #3

This was the link

metric_fu

[metric_fu](https://github.com/metricfu/metric_fu/blob/b1bf8feb921916fc265f041efa3157a6a6530a9b/lib/metric_fu/logging/mf_debugger.rb#L24)

Seems to work fine now that @eviltrout worked so hard to get us MDTest 1.1 compliant.


(Jeff Atwood) #4