repochecker/grammalecte: Write new line only on paragraph exit
This commit is contained in:
parent
ea02fa4617
commit
ccc2c5d1d7
1 changed files with 4 additions and 1 deletions
|
@ -37,7 +37,10 @@ func (r *VoidRenderer) Errors() []error {
|
||||||
}
|
}
|
||||||
|
|
||||||
func (r *VoidRenderer) renderParagraph(w util.BufWriter, source []byte, n ast.Node, entering bool) (ast.WalkStatus, error) {
|
func (r *VoidRenderer) renderParagraph(w util.BufWriter, source []byte, n ast.Node, entering bool) (ast.WalkStatus, error) {
|
||||||
_, _ = w.WriteString("\n")
|
if !entering {
|
||||||
|
_, _ = w.WriteString("\n")
|
||||||
|
}
|
||||||
|
|
||||||
return ast.WalkContinue, nil
|
return ast.WalkContinue, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Reference in a new issue