mirror of
https://github.com/danog/blackfriday.git
synced 2024-11-30 04:29:13 +01: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