mirror of
https://github.com/rwinkhart/glamour-temp-MUTN.git
synced 2026-10-29 04:28:15 -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
@@ -5,7 +5,7 @@ import (
|
||||
"io"
|
||||
"strings"
|
||||
|
||||
"github.com/muesli/reflow"
|
||||
"github.com/muesli/reflow/wordwrap"
|
||||
)
|
||||
|
||||
type ParagraphElement struct {
|
||||
@@ -33,7 +33,7 @@ func (e *ParagraphElement) Finish(w io.Writer, ctx RenderContext) error {
|
||||
|
||||
mw := NewMarginWriter(ctx, w, rules)
|
||||
if len(strings.TrimSpace(bs.Current().Block.String())) > 0 {
|
||||
flow := reflow.NewReflow(int(bs.Width(ctx)))
|
||||
flow := wordwrap.NewWriter(int(bs.Width(ctx)))
|
||||
flow.KeepNewlines = false
|
||||
_, _ = flow.Write(bs.Current().Block.Bytes())
|
||||
flow.Close()
|
||||
|
||||
Reference in new issue
Block a user