all repos — grayfriday @ 97235182ac5e768200740f8050b75e07bb97a43f

blackfriday fork with a few changes

Enable writing plain text straight to output

It's only used in a single place and should probably be refactored away,
but this workaround is OK for now.
Vytautas Ĺ altenis vytas@rtfb.lt
Mon, 09 Nov 2015 21:14:32 +0200
commit

97235182ac5e768200740f8050b75e07bb97a43f

parent

114d6b0d686dee9e73a4ef5440a467e872e52043

4 files changed, 10 insertions(+), 1 deletions(-)

jump to
M html.gohtml.go

@@ -187,6 +187,10 @@ r.w.copyBuff = nil

return output.Bytes() } +func (r *Html) Write(b []byte) (int, error) { + return r.w.Write(b) +} + func (r *Html) GetResult() []byte { return r.w.output.Bytes() }
M inline.goinline.go

@@ -748,7 +748,7 @@ }

anchorStr := anchorRe.Find(data[anchorStart:]) if anchorStr != nil { - out.Write(anchorStr[offsetFromAnchor:]) // XXX: write in parser? + p.r.Write(anchorStr[offsetFromAnchor:]) // XXX: write in parser? return len(anchorStr) - offsetFromAnchor }
M latex.golatex.go

@@ -60,6 +60,10 @@ r.w.copyBuff = nil

return output.Bytes() } +func (r *Latex) Write(b []byte) (int, error) { + return r.w.Write(b) +} + func (r *Latex) GetResult() []byte { return r.w.output.Bytes() }
M markdown.gomarkdown.go

@@ -204,6 +204,7 @@

GetFlags() HtmlFlags CaptureWrites(processor func()) []byte CopyWrites(processor func()) []byte + Write(b []byte) (int, error) GetResult() []byte }