Reference links following lists are inlined #77

Closed
tlvince opened this Issue Sep 18, 2012 · 5 comments

Comments

Projects
None yet
5 participants

tlvince commented Sep 18, 2012

Given the following document:

[link][1]

* List

  [1]: http://example.com

marked renders:

<p>[link][1]

</p>
<ul>
<li><p>List</p>
<p>[1]: http://example.com</p>
</li>
</ul>

... whereas I'd expect:

<p><a href="http://example.com">link</a></p>
<ul>
<li>List</li>
</ul>

GitHub's markdown parser seems to get it right (live preview):

link

  • List
Collaborator

chjj commented Sep 19, 2012

Bah, good catch. This is actually a part of a trickier problem. There are some easy fixes for this, but none that actually replicate exact markdown.pl behavior. I really do want to replicate markdown.pl exactly here, but I'll have to find an efficient fix.

Collaborator

chjj commented Jan 10, 2013

This was a little bit tricky to fix and I'm still not happy with it, but for now, this works: 48c6a43

Contributor

Mithgol commented Feb 19, 2013

The 48c6a43 commit does not seem to be ever merged to the master, and thus the latest npm-hosted marked (version 0.2.8) still does have this issue (if [1]: http://example.com is preceded by some whitespace).

Is that because you are still not happy enough with the fix?

Collaborator

scottgonzalez commented May 29, 2013

@chjj What's holding this up?

lbdremy commented Aug 20, 2013

+1 for this issue would be nice to have support for this. By the way thanks for the great work @chjj !

@chjj chjj closed this in 48c6a43 Feb 21, 2014

Fogetti pushed a commit to Fogetti/marked that referenced this issue May 13, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment