mirror of
https://github.com/danog/blackfriday.git
synced 2024-11-30 04:29:13 +01:00
Expose Parse func that grabs input and returns AST
This commit is contained in:
parent
c1011c8ab2
commit
4c11a2a62d
@ -390,7 +390,10 @@ func MarkdownOptions(input []byte, renderer Renderer, opts Options) []byte {
|
||||
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 @@ func MarkdownOptions(input []byte, renderer Renderer, opts Options) []byte {
|
||||
}
|
||||
})
|
||||
p.parseRefsToAST()
|
||||
return renderer.Render(p.doc)
|
||||
return p.doc
|
||||
}
|
||||
|
||||
func (p *parser) parseRefsToAST() {
|
||||
|
Loading…
Reference in New Issue
Block a user