From cdfbe116a5cf68754b2a40df5b247f6c0ce7ad38 Mon Sep 17 00:00:00 2001 From: Liam Galvin Date: Wed, 24 Apr 2024 15:57:00 +0100 Subject: [PATCH] Add --- README.md | 1 + parser.go | 16 +++++++++------- tags.go | 15 ++++++++------- 3 files changed, 18 insertions(+), 14 deletions(-) diff --git a/README.md b/README.md index bd35627..a2ecc58 100644 --- a/README.md +++ b/README.md @@ -105,3 +105,4 @@ It's not required to close tags you've opened, though it can make for easier rea - `` - `` - `` +- `` diff --git a/parser.go b/parser.go index cded7b8..480663e 100644 --- a/parser.go +++ b/parser.go @@ -30,6 +30,7 @@ const ( reverse hidden italic + strikethrough ) var resetAll = "\x1b[0m" @@ -37,13 +38,14 @@ var resetFg = "\x1b[39m" var resetBg = "\x1b[49m" var attrMap = map[uint8]string{ - bold: "\x1b[1m", - dim: "\x1b[2m", - italic: "\x1b[3m", - underline: "\x1b[4m", - blink: "\x1b[5m", - reverse: "\x1b[7m", - hidden: "\x1b[8m", + bold: "\x1b[1m", + dim: "\x1b[2m", + italic: "\x1b[3m", + underline: "\x1b[4m", + blink: "\x1b[5m", + reverse: "\x1b[7m", + hidden: "\x1b[8m", + strikethrough: "\x1b[9m", } func (s *parserState) setFg(esc string) string { diff --git a/tags.go b/tags.go index 77ff84a..a601407 100644 --- a/tags.go +++ b/tags.go @@ -39,11 +39,12 @@ var bgTags = map[string]string{ } var attrTags = map[string]uint8{ - "bold": bold, - "dim": dim, - "italic": italic, - "underline": underline, - "blink": blink, - "reverse": reverse, - "hidden": hidden, + "bold": bold, + "dim": dim, + "italic": italic, + "underline": underline, + "blink": blink, + "reverse": reverse, + "hidden": hidden, + "strikethrough": strikethrough, }