diff options
author | 2023-07-24 10:21:14 +0000 | |
---|---|---|
committer | 2023-07-24 10:21:14 +0000 | |
commit | b05f6c8f56684cca0754dadfe673b9a13db6ab42 (patch) | |
tree | bc4d52ae6e83e3ed06ff80268bb08be7b7184a78 /vendor/github.com/yuin/goldmark/parser/raw_html.go | |
parent | [chore]: Bump codeberg.org/gruf/go-cache/v3 from 3.4.1 to 3.4.3 (#2022) (diff) | |
download | gotosocial-b05f6c8f56684cca0754dadfe673b9a13db6ab42.tar.xz |
[chore]: Bump github.com/yuin/goldmark from 1.5.4 to 1.5.5 (#2023)
Diffstat (limited to 'vendor/github.com/yuin/goldmark/parser/raw_html.go')
-rw-r--r-- | vendor/github.com/yuin/goldmark/parser/raw_html.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/vendor/github.com/yuin/goldmark/parser/raw_html.go b/vendor/github.com/yuin/goldmark/parser/raw_html.go index 55b9a9967..cae88a66e 100644 --- a/vendor/github.com/yuin/goldmark/parser/raw_html.go +++ b/vendor/github.com/yuin/goldmark/parser/raw_html.go @@ -48,10 +48,10 @@ func (s *rawHTMLParser) Parse(parent ast.Node, block text.Reader, pc Context) as } var tagnamePattern = `([A-Za-z][A-Za-z0-9-]*)` - +var spaceOrOneNewline = `(?:[ \t]|(?:\r\n|\n){0,1})` var attributePattern = `(?:[\r\n \t]+[a-zA-Z_:][a-zA-Z0-9:._-]*(?:[\r\n \t]*=[\r\n \t]*(?:[^\"'=<>` + "`" + `\x00-\x20]+|'[^']*'|"[^"]*"))?)` -var openTagRegexp = regexp.MustCompile("^<" + tagnamePattern + attributePattern + `*[ \t]*/?>`) -var closeTagRegexp = regexp.MustCompile("^</" + tagnamePattern + `\s*>`) +var openTagRegexp = regexp.MustCompile("^<" + tagnamePattern + attributePattern + `*` + spaceOrOneNewline + `*/?>`) +var closeTagRegexp = regexp.MustCompile("^</" + tagnamePattern + spaceOrOneNewline + `*>`) var openProcessingInstruction = []byte("<?") var closeProcessingInstruction = []byte("?>") |