Reflow text in paragraph, strip line-breaks and utilize the available width

This commit is contained in:
Christian Muehlhaeuser
2019-12-05 22:03:35 +01:00
parent 7eec968514
commit 08ffc82515
4 changed files with 12 additions and 3 deletions
+1 -1
View File
@@ -58,7 +58,7 @@ func (e *ListElement) Finish(w io.Writer, node *bf.Node, tr *TermRenderer) error
},
}
_, err := iw.Write(reflow.ReflowBytes(tr.blockStack.Current().Block.Bytes(), tr.WordWrap-int(tr.blockStack.Indent())-int(tr.blockStack.Margin())*2))
_, err := iw.Write(reflow.Bytes(tr.blockStack.Current().Block.Bytes(), tr.WordWrap-int(tr.blockStack.Indent())-int(tr.blockStack.Margin())*2))
if err != nil {
return err
}