mirror of
https://github.com/rwinkhart/glamour-temp-MUTN.git
synced 2026-09-05 08:27:18 -04:00
Simplify code
This commit is contained in:
+2
-4
@@ -22,7 +22,7 @@ func (e *ParagraphElement) Render(w io.Writer, node *bf.Node, tr *TermRenderer)
|
||||
_, _ = w.Write([]byte("\n"))
|
||||
}
|
||||
|
||||
if rules != nil && rules.Prefix != "" {
|
||||
if rules != nil {
|
||||
renderText(w, tr.blockStyle.Current(), rules.Prefix)
|
||||
}
|
||||
return nil
|
||||
@@ -40,9 +40,7 @@ func (e *ParagraphElement) Finish(w io.Writer, node *bf.Node, tr *TermRenderer)
|
||||
indent = 0
|
||||
}
|
||||
}
|
||||
if suffix != "" {
|
||||
renderText(tr.paragraph, rules, suffix)
|
||||
}
|
||||
renderText(tr.paragraph, rules, suffix)
|
||||
|
||||
pw := &PaddingWriter{
|
||||
Padding: uint(tr.WordWrap + int(indent) - int(tr.blockStyle.Indent())),
|
||||
|
||||
Reference in New Issue
Block a user