mirror of
https://github.com/rwinkhart/glamour-temp-MUTN.git
synced 2026-09-06 00:47:15 -04:00
Calculate block width from BlockStack & RenderContext
This commit is contained in:
+1
-4
@@ -7,7 +7,6 @@ import (
|
||||
)
|
||||
|
||||
type HeadingElement struct {
|
||||
Width uint
|
||||
Text string
|
||||
Level int
|
||||
First bool
|
||||
@@ -51,9 +50,7 @@ func (e *HeadingElement) Render(w io.Writer, ctx RenderContext) error {
|
||||
},
|
||||
}
|
||||
|
||||
flow := reflow.NewReflow(int(e.Width) -
|
||||
int(indent) - int(margin*2) -
|
||||
int(bs.Indent()) - int(bs.Margin())*2)
|
||||
flow := reflow.NewReflow(int(bs.Width(ctx) - indent - margin*2))
|
||||
|
||||
var pre string
|
||||
if !e.First {
|
||||
|
||||
Reference in New Issue
Block a user