Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MarkdownHeader pattern also consumes hashtags #5

Open
jcollas opened this issue Jan 29, 2018 · 1 comment
Open

MarkdownHeader pattern also consumes hashtags #5

jcollas opened this issue Jan 29, 2018 · 1 comment

Comments

@jcollas
Copy link

jcollas commented Jan 29, 2018

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

@DavidLari
Copy link
Owner

@jcollas Thanks for the information and the linked issue. Let me consider this for a few days and also, see if anyone else using the library has feedback on the best way to proceed. I saw a lot of good discussion on the linked issue and it's a lot to consider.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants