Skip to content

Reference links following lists are inlined #77

Closed

Description

@tlvince

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

Activity

  1. chjj commented on Sep 19, 2012

    @chjj
    Member

    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.

  2. chjj commented on Jan 10, 2013

    @chjj
    Member

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

  3. Mithgol commented on Feb 19, 2013

    @Mithgol
    Contributor

    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?

  4. scottgonzalez commented on May 29, 2013

    @scottgonzalez
    Contributor

    @chjj What's holding this up?

  5. lbdremy commented on Aug 20, 2013

    @lbdremy

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

  6. ghost added a commit that references this issue on May 13, 2016
    776fad6
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions