Skip to content

Commit

Permalink
add underscore to endchar
Browse files Browse the repository at this point in the history
  • Loading branch information
kfur authored and mvdan committed Nov 26, 2019
1 parent 8a0a17d commit f319907
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion xurls.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ const (
iriChar = letter + mark + number
currency = `\p{Sc}`
otherSymb = `\p{So}`
endChar = iriChar + `/\-+&~%=#` + currency + otherSymb
endChar = iriChar + `/\-_+&~%=#` + currency + otherSymb
otherPunc = `\p{Po}`
midChar = endChar + "_*" + otherPunc
wellParen = `\([` + midChar + `]*(\([` + midChar + `]*\)[` + midChar + `]*)*\)`
Expand Down
2 changes: 1 addition & 1 deletion xurls_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ var constantTestCases = []testCase{
{`,http://foo.com/bar,more`, `http://foo.com/bar,more`},
{`*http://foo.com/bar*`, `http://foo.com/bar`},
{`*http://foo.com/bar*more`, `http://foo.com/bar*more`},
{`_http://foo.com/bar_`, `http://foo.com/bar`},
{`_http://foo.com/bar_`, `http://foo.com/bar_`},
{`_http://foo.com/bar_more`, `http://foo.com/bar_more`},
{`(http://foo.com/bar)`, `http://foo.com/bar`},
{`(http://foo.com/bar)more`, `http://foo.com/bar`},
Expand Down

0 comments on commit f319907

Please sign in to comment.