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

Unify handling of opening and closing parentheses #40

Closed
ThiefMaster opened this issue Jan 29, 2019 · 6 comments
Closed

Unify handling of opening and closing parentheses #40

ThiefMaster opened this issue Jan 29, 2019 · 6 comments

Comments

@ThiefMaster
Copy link
Contributor

#24 added support so a message like (see GH-1234) can have GH-1234 autolinked, but the other way round doesn't work, so (GH-1234 might solve your bug) won't be autolinked.

This can already be worked around by enabling DisableNonWordPrefix and then using a custom regex to specify the boundary, but I think more consistent default logic makes more sense.

@jespino
Copy link
Contributor

jespino commented Jan 31, 2019

Yes, that would be great, I have to think about it, maybe we can have another flag to allow that or a special field to specified a list of valid extra prefixes, like (, {, , or whatever.

@jasonblais
Copy link
Contributor

FYI @levb @jfrerich This is one bug which would get noticed and reported as an issue in a GA release

@levb
Copy link
Contributor

levb commented Jun 2, 2019

I'd appear that post 1.0 we probably want to change the semantics as:

[x] Match entire word
[x] Word start separators:
        [x] white space
        [x] other:  <  ([{  >
[x] Word end separators:
        [x] white space
        [x] other:  <  )]}  >

so the config entry might look like this:

{
    "Pattern": ...,
    "Template": ...,
    [ "DisableMatchEntireWord": true, ]
    // Or...
    [ "StartWord": "character class regexp, complete with whitespace as needed", ]
    [ "EndWord": "character class regexp", ]
}

For 1.0 I'll see if I can quickly add the ( to the prefix list to address this specific issue.

@andrey-yantsen
Copy link

Wasn't it fixed after #67 and release of v1.1.0?

@jasonblais
Copy link
Contributor

cc @levb on above note from Andrey

@levb
Copy link
Contributor

levb commented Aug 21, 2019

@andrey-yantsen #67 failed to be backwards compatible, but #71 introduced the WordBoundary[=true] link property to use the more standard \b word boundaries. If you turn it on, it should solve the ( issue.

@levb levb closed this as completed Aug 21, 2019
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

6 participants