Add strikethrough type

This commit is contained in:
2026-07-14 17:45:50 +02:00
parent dc49129999
commit 7737c2d763
3 changed files with 11 additions and 0 deletions
+8
View File
@@ -69,6 +69,14 @@ print_html :: proc(token: ^Token) {
} }
fmt.print("</em>") fmt.print("</em>")
case TokenType.Strikethrough:
fmt.print("<strike>")
for child in token.children {
print_html(child)
}
fmt.print("</strike>")
case TokenType.BreakLine: case TokenType.BreakLine:
fmt.print("<br>\n") fmt.print("<br>\n")
+2
View File
@@ -37,6 +37,8 @@ print_token :: proc(token: ^Token, depth: int = 0) {
type_str = "OrderedList" type_str = "OrderedList"
case TokenType.ListItem: case TokenType.ListItem:
type_str = "ListItem" type_str = "ListItem"
case TokenType.Strikethrough:
type_str = "Strikethrough"
} }
value_str := "" value_str := ""
+1
View File
@@ -15,6 +15,7 @@ TokenType :: enum {
UnorderedList, UnorderedList,
OrderedList, OrderedList,
ListItem, ListItem,
Strikethrough,
} }
TokenValue :: union { TokenValue :: union {