Skip to content

Commit a3cfcc3

Browse files
author
shadowy-pycoder
committed
Fixed multiline a href tag
1 parent b959f51 commit a3cfcc3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

goso.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ var (
3636
codeStartIdx int
3737
codeEndIdx int
3838
codePattern = regexp.MustCompile(`<pre\s.*?>`)
39-
aHrefPattern = regexp.MustCompile(`<a\s+(?:[^>]*?\s+)?href=(["'])?([^\'" >]+)(.*?)?</a>`)
39+
aHrefPattern = regexp.MustCompile(`(?s)<a\s+(?:[^>]*?\s+)?href=(["'])?([^\'" >]+)(.*?)?</a>`)
4040
divPattern = regexp.MustCompile(`<div.*?>`)
4141
bqPattern = regexp.MustCompile(`<blockquote.*?>`)
4242
r = strings.NewReplacer(

0 commit comments

Comments
 (0)