Skip to content

MarkdownHeader pattern also consumes hashtags #5

Open
@jcollas

Description

@jcollas

If you have text like "#hashtag\n# Header", both will be treated as a header. Since there's no space after the # in #hashtag, it shouldn't be processed into a header.

It would be nice if either the pattern was not fileprivate so consumers of the framework could change the behavior, or if the pattern in line 13 were changed to

fileprivate static let regex = "^(#{1,%@} \\s*(.+)$" # add space before \\s

Here's a reference to a similar issue and its resolution: markedjs/marked#201

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