Support strikethrough elements

This commit is contained in:
Christian Muehlhaeuser
2019-12-13 03:00:45 +01:00
parent 6f20136abc
commit 0a3ba0ae35
3 changed files with 16 additions and 1 deletions
+12
View File
@@ -149,6 +149,18 @@ func (tr *TermRenderer) NewElement(node ast.Node, source []byte) Element {
},
}
case astext.KindStrikethrough:
n := node.(*astext.Strikethrough)
s := string(n.Text(source))
style := ctx.style[Strikethrough]
return Element{
Renderer: &BaseElement{
Token: ctx.SanitizeHTML(s, false),
Style: style,
},
}
case ast.KindThematicBreak:
return Element{
Entering: "",