mirror of
https://github.com/rwinkhart/glamour-temp-MUTN.git
synced 2026-10-28 20:18:16 -04:00
Follow upstream reflow API changes
This commit is contained in:
1 parent
52c56467f6
commit
b0857fb690
5 files changed
+9
-9
No files matched your search
+2
-2
@@ -4,7 +4,7 @@ import (
|
||||
"bytes"
|
||||
"io"
|
||||
|
||||
"github.com/muesli/reflow"
|
||||
"github.com/muesli/reflow/wordwrap"
|
||||
)
|
||||
|
||||
type HeadingElement struct {
|
||||
@@ -69,7 +69,7 @@ func (e *HeadingElement) Finish(w io.Writer, ctx RenderContext) error {
|
||||
},
|
||||
}
|
||||
|
||||
flow := reflow.NewReflow(int(bs.Width(ctx) - indent - margin*2))
|
||||
flow := wordwrap.NewWriter(int(bs.Width(ctx) - indent - margin*2))
|
||||
_, err := flow.Write(bs.Current().Block.Bytes())
|
||||
if err != nil {
|
||||
return err
|
||||
|
||||
Reference in new issue
Block a user