npm / marky-markdown

npm's markdown parser
https://www.npmjs.com/package/@npmcorp/marky-markdown
405 stars 71 forks source link

strange whitespace encoding causes epic id attribute fail #194

Closed ashleygwilliams closed 8 years ago

ashleygwilliams commented 8 years ago

https://github.com/ashleygwilliams/marky-test

steps to repro:

  1. git clone
  2. npm install
  3. npm test
  4. open README.html
screen shot 2016-05-31 at 7 12 34 pm screen shot 2016-05-31 at 7 19 16 pm
revin commented 8 years ago

😳 Fascinating!

markdown-it is supposed to normalize line endings, so this must be somehow making it through that; I'll start looking there for answers.

revin commented 8 years ago

ok, it's because the regular expression markdown-it uses is skipping the \rline endings in this file.

@ashleygwilliams do you think that counts as a bug in markdown-it?

This is kind of a kick; according to Wikipedia's Newline article, \r by itself as a line ending was used on such systems as:

Commodore 8-bit machines, Acorn BBC, ZX Spectrum, TRS-80, Apple II family, Oberon, Mac OS up to version 9, MIT Lisp Machine and OS-9

... so I have a (presumptuous) hunch that if I open a bug, it'll be written off as input error 😛 . I'm willing to give it a shot though.

But still, how cool would it be if people were authoring node packages on one of those platforms?

revin commented 8 years ago

(as the WP article points out, \r is a valid line terminator in the Unicode standard)

ashleygwilliams commented 8 years ago

@revin yeah that def sounds like a markdown it bug to me... but since you filed last time- do you want me to file?

also i love this bug

revin commented 8 years ago

If you totally want to or whatever, go for it; I don't mind doing it tomorrow myself either though. Whoever has time first.

Agreed, this is a pretty great bug.

On Tuesday, May 31, 2016, ashley williams notifications@github.com wrote:

@revin https://github.com/revin yeah that def sounds like a markdown it bug to me... but since you filed last time- do you want me to file?

also i love this bug

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/npm/marky-markdown/issues/194#issuecomment-222865202, or mute the thread https://github.com/notifications/unsubscribe/AAFygsZsSNL5hnpwHG7nj7SEhH4zuwZGks5qHNo4gaJpZM4IrDJN .

Revin Guillen rg@sevenite.com

revin commented 8 years ago

@ashleygwilliams markdown-it#252

revin commented 8 years ago

ok they fixed it; presumably it'll be in markdown-it@6.0.5; which means we'll be blocked here until we merge #153 since we're still on 5.x in marky@7.

revin commented 8 years ago

Fixed in 8.0.

🍾 pour one out for a really great bug