mirror of
https://github.com/rwinkhart/glamour-temp-MUTN.git
synced 2026-09-06 08:57:14 -04:00
Use ElementStyle as a value instead of pointer, so we can drop all the annoying nil checks
This commit is contained in:
+5
-7
@@ -32,13 +32,11 @@ func (e *HeadingElement) Render(w io.Writer, node *bf.Node, tr *TermRenderer) er
|
||||
rules = cascadeStyles(false, rules, tr.style[H6])
|
||||
}
|
||||
|
||||
if rules != nil {
|
||||
if rules.Indent != nil {
|
||||
indent = *rules.Indent
|
||||
}
|
||||
if rules.Margin != nil {
|
||||
margin = *rules.Margin
|
||||
}
|
||||
if rules.Indent != nil {
|
||||
indent = *rules.Indent
|
||||
}
|
||||
if rules.Margin != nil {
|
||||
margin = *rules.Margin
|
||||
}
|
||||
|
||||
iw := &IndentWriter{
|
||||
|
||||
Reference in New Issue
Block a user