Cascade other style options to children when requested

This commit is contained in:
Christian Muehlhaeuser
2019-12-05 14:07:10 +01:00
parent eaed263d06
commit c4b02ad80d
13 changed files with 120 additions and 59 deletions
+6 -2
View File
@@ -32,8 +32,12 @@ func (e *ListElement) Finish(w io.Writer, node *bf.Node, tr *TermRenderer) error
var suffix string
rules := tr.blockStack.Current().Style
if rules != nil {
indent = rules.Indent
margin = rules.Margin
if rules.Indent != nil {
indent = *rules.Indent
}
if rules.Margin != nil {
margin = *rules.Margin
}
suffix = rules.Suffix
}
renderText(tr.blockStack.Current().Block, rules, suffix)