mirror of
https://github.com/russross/blackfriday.git
synced 2024-03-22 13:40:34 +08:00
Go style: take advantage of zero value init
This commit is contained in:
parent
1303ea1427
commit
9f5de868aa
6
html.go
6
html.go
|
@ -101,7 +101,7 @@ type HTML struct {
|
|||
tocMarker int
|
||||
headerCount int
|
||||
currentLevel int
|
||||
toc *bytes.Buffer
|
||||
toc bytes.Buffer
|
||||
|
||||
// Track header IDs to prevent ID collision in a single generation.
|
||||
headerIDs map[string]int
|
||||
|
@ -152,10 +152,6 @@ func NewHTMLRenderer(params HTMLRendererParameters) Renderer {
|
|||
closeTag: closeTag,
|
||||
parameters: params,
|
||||
|
||||
headerCount: 0,
|
||||
currentLevel: 0,
|
||||
toc: new(bytes.Buffer),
|
||||
|
||||
headerIDs: make(map[string]int),
|
||||
|
||||
w: writer,
|
||||
|
|
|
@ -351,7 +351,7 @@ func MarkdownBasic(input []byte) []byte {
|
|||
})
|
||||
|
||||
// set up the parser
|
||||
return Markdown(input, renderer, Options{Extensions: 0})
|
||||
return Markdown(input, renderer, Options{})
|
||||
}
|
||||
|
||||
// Call Markdown with most useful extensions enabled
|
||||
|
|
Loading…
Reference in New Issue
Block a user