markdown.go: Parser.Markdown: reset the buffer at beginning (needs to be resolved later)

This commit is contained in:
Michael Teichgräber 2012-07-20 12:33:52 +02:00
parent fa16c1c9ea
commit e53a34621e

View File

@ -72,6 +72,11 @@ type Formatter interface {
func (p *Parser) Markdown(src io.Reader, f Formatter) { func (p *Parser) Markdown(src io.Reader, f Formatter) {
s := p.preformat(src) s := p.preformat(src)
// this should not be necessary;
// investigation is needed to understand
// why the buffer sometimes is not empty
p.yy.ResetBuffer("")
p.parseRule(ruleReferences, s) p.parseRule(ruleReferences, s)
if p.yy.extension.Notes { if p.yy.extension.Notes {
p.parseRule(ruleNotes, s) p.parseRule(ruleNotes, s)