1
0
forked from lug/matterbridge

Update markdown parsing library to github.com/gomarkdown/markdown (#944)

This commit is contained in:
Benjamin
2019-11-18 06:18:01 +10:00
committed by Wim
parent aba86855b5
commit 0917dc8766
120 changed files with 8282 additions and 47873 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
}