all repos — grayfriday @ 4c11a2a62d104b7dc0bbe23c80b216628bee0e25

blackfriday fork with a few changes

Expose Parse func that grabs input and returns AST
Vytautas Ĺ altenis vytas@rtfb.lt
Wed, 30 Mar 2016 19:40:10 +0300
commit

4c11a2a62d104b7dc0bbe23c80b216628bee0e25

parent

c1011c8ab22a8f6d401f5b6a3f67aed5f6b1362b

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

jump to
M markdown.gomarkdown.go

@@ -390,7 +390,10 @@ // no point in parsing if we can't render

if renderer == nil { return nil } + return renderer.Render(Parse(input, opts)) +} +func Parse(input []byte, opts Options) *Node { extensions := opts.Extensions // fill in the render structure

@@ -450,7 +453,7 @@ node.content = nil

} }) p.parseRefsToAST() - return renderer.Render(p.doc) + return p.doc } func (p *parser) parseRefsToAST() {