jonschlinkert / remarkable

Markdown parser, done right. Commonmark support, extensions, syntax plugins, high speed - all in one. Gulp and metalsmith plugins available. Used by Facebook, Docusaurus and many others! Use https://github.com/breakdance/breakdance for HTML-to-markdown conversion. Use https://github.com/jonschlinkert/markdown-toc to generate a table of contents.
https://jonschlinkert.github.io/remarkable/demo/
MIT License
5.74k stars 371 forks source link

Linkifier incorrectly composing links (w/ example) #51

Closed julianlam closed 9 years ago

julianlam commented 9 years ago

Hard for me to actually determine why this is happening, but I am seeing Remarkable not compose a detected link properly.

The problematic string is: (www.example.org版权所有,如需转载,注明出处)

After being parsed by Remarkable, the resulting output is:

<p>(www.example.org版权所有,如需转载,注明出处<a href="http://www.example.org">http://www.example.org</a>如需转载,注明出处)</p>

Please note the repeated text.

I have determined that the problem does not lie with Autolinker:

> autolinker.link('(www.example.org版权所有,如需转载,注明出处)')
'(<a href="http://www.example.org" target="_blank">example.org</a>版权所有,如需转载,注明出处)'

P.S. For ease of debugging, this also happens w/ Latin characters: (www.example.orgabcabc, defdef, ghighi)

julianlam commented 9 years ago

:+1: Thanks @puzrin!