mirror of
https://github.com/rwinkhart/glamour-temp-MUTN.git
synced 2026-09-05 16:37:19 -04:00
Use renderText even without an active style
This commit is contained in:
+3
-1
@@ -13,6 +13,7 @@ type ParagraphElement struct {
|
||||
|
||||
func (e *ParagraphElement) Render(w io.Writer, node *bf.Node, tr *TermRenderer) error {
|
||||
tr.paragraph = &bytes.Buffer{}
|
||||
|
||||
rules := tr.style[Paragraph]
|
||||
tr.blockStyle.Push(rules)
|
||||
|
||||
@@ -37,6 +38,7 @@ func (e *ParagraphElement) Finish(w io.Writer, node *bf.Node, tr *TermRenderer)
|
||||
suffix = rules.Suffix
|
||||
|
||||
if node.Prev == nil || (node.Parent != nil && node.Parent.Type == bf.Item) {
|
||||
// remove indent for list items
|
||||
indent = 0
|
||||
}
|
||||
}
|
||||
@@ -66,9 +68,9 @@ func (e *ParagraphElement) Finish(w io.Writer, node *bf.Node, tr *TermRenderer)
|
||||
|
||||
tr.paragraph.Reset()
|
||||
tr.paragraph = nil
|
||||
|
||||
if rules != nil {
|
||||
tr.blockStyle.Pop()
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user