Expose Parse func that grabs input and returns AST
Vytautas Ĺ altenis vytas@rtfb.lt
Wed, 30 Mar 2016 19:40:10 +0300
1 files changed,
4 insertions(+),
1 deletions(-)
jump to
M
markdown.go
→
markdown.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() {