mirror of
https://github.com/cwinfo/matterbridge.git
synced 2025-07-11 21:16:27 +00:00
Update dependencies (#1841)
This commit is contained in:
4
vendor/github.com/gomarkdown/markdown/parser/block.go
generated
vendored
4
vendor/github.com/gomarkdown/markdown/parser/block.go
generated
vendored
@ -24,8 +24,8 @@ const (
|
||||
)
|
||||
|
||||
var (
|
||||
reBackslashOrAmp = regexp.MustCompile("[\\&]")
|
||||
reEntityOrEscapedChar = regexp.MustCompile("(?i)\\\\" + escapable + "|" + charEntity)
|
||||
reBackslashOrAmp = regexp.MustCompile(`[\&]`)
|
||||
reEntityOrEscapedChar = regexp.MustCompile(`(?i)\\` + escapable + "|" + charEntity)
|
||||
|
||||
// blockTags is a set of tags that are recognized as HTML block tags.
|
||||
// Any of these can be included in markdown text without special escaping.
|
||||
|
10
vendor/github.com/gomarkdown/markdown/parser/inline.go
generated
vendored
10
vendor/github.com/gomarkdown/markdown/parser/inline.go
generated
vendored
@ -6,6 +6,7 @@ import (
|
||||
"strconv"
|
||||
|
||||
"github.com/gomarkdown/markdown/ast"
|
||||
"github.com/gomarkdown/markdown/internal/valid"
|
||||
)
|
||||
|
||||
// Parsing of inline elements
|
||||
@ -994,12 +995,9 @@ func isEndOfLink(char byte) bool {
|
||||
return isSpace(char) || char == '<'
|
||||
}
|
||||
|
||||
var validUris = [][]byte{[]byte("http://"), []byte("https://"), []byte("ftp://"), []byte("mailto://")}
|
||||
var validPaths = [][]byte{[]byte("/"), []byte("./"), []byte("../")}
|
||||
|
||||
func isSafeLink(link []byte) bool {
|
||||
nLink := len(link)
|
||||
for _, path := range validPaths {
|
||||
for _, path := range valid.Paths {
|
||||
nPath := len(path)
|
||||
linkPrefix := link[:nPath]
|
||||
if nLink >= nPath && bytes.Equal(linkPrefix, path) {
|
||||
@ -1011,7 +1009,7 @@ func isSafeLink(link []byte) bool {
|
||||
}
|
||||
}
|
||||
|
||||
for _, prefix := range validUris {
|
||||
for _, prefix := range valid.URIs {
|
||||
// TODO: handle unicode here
|
||||
// case-insensitive prefix test
|
||||
nPrefix := len(prefix)
|
||||
@ -1119,7 +1117,7 @@ func isMailtoAutoLink(data []byte) int {
|
||||
nb++
|
||||
|
||||
case '-', '.', '_':
|
||||
break
|
||||
// no-op but not defult
|
||||
|
||||
case '>':
|
||||
if nb == 1 {
|
||||
|
3
vendor/github.com/gomarkdown/markdown/parser/parser.go
generated
vendored
3
vendor/github.com/gomarkdown/markdown/parser/parser.go
generated
vendored
@ -8,7 +8,6 @@ import (
|
||||
"fmt"
|
||||
"strconv"
|
||||
"strings"
|
||||
"unicode/utf8"
|
||||
|
||||
"github.com/gomarkdown/markdown/ast"
|
||||
)
|
||||
@ -720,6 +719,7 @@ func isAlnum(c byte) bool {
|
||||
// TODO: this is not used
|
||||
// Replace tab characters with spaces, aligning to the next TAB_SIZE column.
|
||||
// always ends output with a newline
|
||||
/*
|
||||
func expandTabs(out *bytes.Buffer, line []byte, tabSize int) {
|
||||
// first, check for common cases: no tabs, or only tabs at beginning of line
|
||||
i, prefix := 0, 0
|
||||
@ -775,6 +775,7 @@ func expandTabs(out *bytes.Buffer, line []byte, tabSize int) {
|
||||
i++
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
// Find if a line counts as indented or not.
|
||||
// Returns number of characters the indent is (0 = not indented).
|
||||
|
Reference in New Issue
Block a user