1
0
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:
Vytautas Šaltenis 2016-04-05 14:34:30 +03:00
parent 1303ea1427
commit 9f5de868aa
2 changed files with 2 additions and 6 deletions

View File

@ -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,

View File

@ -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