This commit is contained in:
yuin 2019-12-02 13:17:08 +09:00
parent 615d5706c6
commit eb2667632a
2 changed files with 4 additions and 4 deletions

View file

@ -117,7 +117,7 @@ a.b-c_d@a.b_
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>
//= = = = = = = = = = = = = = = = = = = = = = = =//

View file

@ -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 {
}