all repos — grayfriday @ d36199c4175ae1be4c1d8402793677d934cb6cd0

blackfriday fork with a few changes

Rename firstPass -> preprocess
Vytautas Ĺ altenis vytas@rtfb.lt
Sat, 03 Sep 2016 15:32:37 +0300
commit

d36199c4175ae1be4c1d8402793677d934cb6cd0

parent

3c2cb1ff45440f61fccc99f602175f6bdf09393d

1 files changed, 3 insertions(+), 3 deletions(-)

jump to
M markdown.gomarkdown.go

@@ -394,7 +394,7 @@ if extensions&Footnotes != 0 {

p.notes = make([]*reference, 0) } - p.block(firstPass(p, input)) + p.block(preprocess(p, input)) // Walk the tree and finish up some of unfinished blocks for p.tip != nil { p.finalize(p.tip)

@@ -449,11 +449,11 @@ return GoToNext

}) } -// first pass: +// preprocess does a preparatory first pass over the input: // - normalize newlines // - expand tabs (outside of fenced code blocks) // - copy everything else -func firstPass(p *parser, input []byte) []byte { +func preprocess(p *parser, input []byte) []byte { var out bytes.Buffer tabSize := TabSizeDefault if p.flags&TabSizeEight != 0 {