-
-
Notifications
You must be signed in to change notification settings - Fork 456
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
It would be nice if autolink could be matched on more leading punctuations #261
Labels
Comments
jijiechen
changed the title
It would be nice if autolink could be matched on more leading punctuation
It would be nice if autolink could be matched on more leading punctuations
Oct 27, 2018
Yes, markdig should follow what GitHub is actually expecting for autolinks. You can make a PR by changing the test:
and using a string instead:
PR welcome! |
Would something like #264 be okay? (Most of it is just exposing the public field) |
This is a just-pushed commit! |
Closing as resolved |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
In current implementation of Markdig as of 0.15.2, links are not automatically created if there are more kinds of leading punctuations than the ones recognized by Markdig at here:
https://github.com/lunet-io/markdig/blob/master/src/Markdig/Extensions/AutoLinks/AutoLinkParser.cs#L34
(Only whitespace,
*
,*
,_
,~
(
are accepted for now).So if links could be matched and created on more kinds of leading punctuations, that'll be nice. Either list more allowed punctuations or make the
IsValidPreviousCharacter
method an instance method and overridable is helpful.I know and fully understand that it's a normal manner to put whitespaces before links in English (because links are just new words in sentences.) But in other languages, like Chinese, it's also normal there are other punctuations before links.
For instance:
Punctuations need to be matched are:
The text was updated successfully, but these errors were encountered: