all repos — grayfriday @ 3575453f087dcd9b4d23359ca1bf8563d3c3754f

blackfriday fork with a few changes

Move a couple helpers to parser where they're used
Vytautas Ĺ altenis vytas@rtfb.lt
Mon, 11 Apr 2016 11:51:16 +0300
commit

3575453f087dcd9b4d23359ca1bf8563d3c3754f

parent

76d8c71d704b5109ae86cc2d8d2d5d4714a70917

2 files changed, 16 insertions(+), 16 deletions(-)

jump to
M block.goblock.go

@@ -1485,3 +1485,19 @@

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 +}
M html.gohtml.go

@@ -216,24 +216,8 @@

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++ - } - return i -} - -func skipChar(data []byte, start int, char byte) int { - i := start - for i < len(data) && data[i] == char { i++ } return i