Skip to content

Only match includes at the beginning of the line #67

@q0rban

Description

@q0rban

It seems that this is matching all links whether they start at the beginning of the line or not. Here's the regex in use:

/\[(?=((?:[^\]]|\\.)*))\1\]\((?=((?:[^\)]|\\.)*))\2\)/gm

Seems like a simple fix would be:

/^\[(?=((?:[^\]]|\\.)*))\1\]\((?=((?:[^\)]|\\.)*))\2\)/gm

This is related to #65. Another fix that would resolve both issues, and increase the performance of the plugin:

/^\[(?=(import|include(?:[^\]]|\\.)*))\1\]\((?=((?:[^\)]|\\.)*))\2\)/gm

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions