Add go dependencies for mdtoc

This commit is contained in:
Manuel Alejandro de Brito Fontes 2019-07-21 14:00:47 -04:00
parent cb33c4ed26
commit 36959a4878
No known key found for this signature in database
GPG key ID: 786136016A8BA02A
63 changed files with 12675 additions and 0 deletions

20
vendor/github.com/gomarkdown/markdown/parser/esc.go generated vendored Normal file
View file

@ -0,0 +1,20 @@
package parser
// isEscape returns true if byte i is prefixed by an odd number of backslahses.
func isEscape(data []byte, i int) bool {
if i == 0 {
return false
}
if i == 1 {
return data[0] == '\\'
}
j := i - 1
for ; j >= 0; j-- {
if data[j] != '\\' {
break
}
}
j++
// odd number of backslahes means escape
return (i-j)%2 != 0
}