Skip to content

Commit

Permalink
Fixes #48
Browse files Browse the repository at this point in the history
  • Loading branch information
yuin committed Dec 2, 2019
1 parent 615d570 commit eb26676
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions extension/_test/linkify.txt
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ [email protected]_

11
//- - - - - - - - -//
Go to [http://www.example.com](www.example.com)
https://github.com#sun,mon
//- - - - - - - - -//
<p>Go to <a href="www.example.com">http://www.example.com</a></p>
<p><a href="https://github.com#sun,mon">https://github.com#sun,mon</a></p>
//= = = = = = = = = = = = = = = = = = = = = = = =//
4 changes: 2 additions & 2 deletions extension/linkify.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ import (
"regexp"
)

var wwwURLRegxp = regexp.MustCompile(`^www\.[-a-zA-Z0-9@:%._\+~#=]{2,256}\.[a-z]{2,6}\b(?:[-a-zA-Z0-9@:%_\+.~#?&//=\(\);]*)`)
var wwwURLRegxp = regexp.MustCompile(`^www\.[-a-zA-Z0-9@:%._\+~#=]{2,256}\.[a-z]{2,6}\b(?:[-a-zA-Z0-9@:%_\+.~#?&//=\(\);,]*)`)

var urlRegexp = regexp.MustCompile(`^(?:http|https|ftp):\/\/(?:www\.)?[-a-zA-Z0-9@:%._\+~#=]{2,256}\.[a-z]{2,6}\b([-a-zA-Z0-9@:%_\+.~#?&//=\(\);]*)`)
var urlRegexp = regexp.MustCompile(`^(?:http|https|ftp):\/\/(?:www\.)?[-a-zA-Z0-9@:%._\+~#=]{2,256}\.[a-z]{2,6}\b([-a-zA-Z0-9@:%_\+.~#?&//=\(\);,]*)`)

type linkifyParser struct {
}
Expand Down

0 comments on commit eb26676

Please sign in to comment.