Skip to content

gfm-like is too greedy when it comes to links #316

Open
@nschloe

Description

@nschloe

Describe the bug

MWE:

from markdown_it import MarkdownIt
from markdown_it.tree import SyntaxTreeNode

md = MarkdownIt("gfm-like")
tokens = md.parse("74.78.Fk")

print(SyntaxTreeNode(tokens).pretty())

Output:

<root>
  <paragraph>
    <inline>
      <link href='http://74.78.Fk'>
        <text>

Problem: "74.78.Fk" is not a link.

This problem doesn't occur with md = MarkdownIt()

Reproduce the bug

See above.

List your environment

markdown-it --version
markdown-it-py [version 3.0.0]

This is on Python 3.11.

Tip for devs: Add a --show-env parameter to markdown-it which shows all relevant packages and versions in one go.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingpluginsPlugin specific issues

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions