diff --git a/block.go b/block.go index 498c084..1393ff1 100644 --- a/block.go +++ b/block.go @@ -1485,3 +1485,19 @@ func (p *parser) paragraph(data []byte) int { p.renderParagraph(data[:i]) return i } + +func skipChar(data []byte, start int, char byte) int { + i := start + for i < len(data) && data[i] == char { + i++ + } + return i +} + +func skipUntilChar(text []byte, start int, char byte) int { + i := start + for i < len(text) && text[i] != char { + i++ + } + return i +} diff --git a/html.go b/html.go index efd30a6..d530061 100644 --- a/html.go +++ b/html.go @@ -216,14 +216,6 @@ func findHtmlTagPos(tag []byte, tagname string) (bool, int) { return false, -1 } -func skipUntilChar(text []byte, start int, char byte) int { - i := start - for i < len(text) && text[i] != char { - i++ - } - return i -} - func skipSpace(tag []byte, i int) int { for i < len(tag) && isspace(tag[i]) { i++ @@ -231,14 +223,6 @@ func skipSpace(tag []byte, i int) int { return i } -func skipChar(data []byte, start int, char byte) int { - i := start - for i < len(data) && data[i] == char { - i++ - } - return i -} - func isRelativeLink(link []byte) (yes bool) { // a tag begin with '#' if link[0] == '#' {