Add strikethrough type
This commit is contained in:
@@ -69,6 +69,14 @@ print_html :: proc(token: ^Token) {
|
||||
}
|
||||
fmt.print("</em>")
|
||||
|
||||
case TokenType.Strikethrough:
|
||||
fmt.print("<strike>")
|
||||
for child in token.children {
|
||||
print_html(child)
|
||||
}
|
||||
fmt.print("</strike>")
|
||||
|
||||
|
||||
case TokenType.BreakLine:
|
||||
fmt.print("<br>\n")
|
||||
|
||||
|
||||
@@ -37,6 +37,8 @@ print_token :: proc(token: ^Token, depth: int = 0) {
|
||||
type_str = "OrderedList"
|
||||
case TokenType.ListItem:
|
||||
type_str = "ListItem"
|
||||
case TokenType.Strikethrough:
|
||||
type_str = "Strikethrough"
|
||||
}
|
||||
|
||||
value_str := ""
|
||||
|
||||
@@ -15,6 +15,7 @@ TokenType :: enum {
|
||||
UnorderedList,
|
||||
OrderedList,
|
||||
ListItem,
|
||||
Strikethrough,
|
||||
}
|
||||
|
||||
TokenValue :: union {
|
||||
|
||||
Reference in New Issue
Block a user