diff --git a/render.go b/render.go index 7ae1ce8..b0e4ec9 100644 --- a/render.go +++ b/render.go @@ -211,7 +211,7 @@ func (o *Op) writeBlock(vars *renderVars) { // Avoid empty paragraphs and "\n" in the output for text blocks. if o.Data == "" && block.tagName == "p" && vars.tempBuf.Len() == 0 { - o.Data = "
" + o.Data = "
" } if block.tagName != "" { @@ -227,7 +227,7 @@ func (o *Op) writeBlock(vars *renderVars) { vars.finalBuf.Write(vars.tempBuf.Bytes()) // Copy the temporary buffer to the final output. - vars.finalBuf.WriteString(o.Data) // Copy the data of the current Op (usually just "
" or blank). + vars.finalBuf.WriteString(o.Data) // Copy the data of the current Op (usually just "
" or blank). if block.tagName != "" { closeTag(&vars.finalBuf, block.tagName) diff --git a/render_test.go b/render_test.go index b565ff3..c1c94af 100644 --- a/render_test.go +++ b/render_test.go @@ -15,7 +15,7 @@ func TestSimple(t *testing.T) { }{ "empty": { ops: `[{"insert": "\n"}]`, - want: "


", + want: "


", }, "two paragraphs (single op)": { ops: `[{"insert": "line1\nline2\n"}]`, @@ -23,7 +23,7 @@ func TestSimple(t *testing.T) { }, "blank line": { ops: `[{"insert": "line1\n\nline3\n"}]`, - want: "

line1


line3

", + want: "

line1


line3

", }, "blockquote": { ops: `[{"insert": "bkqt"}, {"attributes": {"blockquote": true}, "insert": "\n"}]`,