Skip to content

Commit

Permalink
Merge pull request #9 from liamg/liamg-italic
Browse files Browse the repository at this point in the history
liamg italic
  • Loading branch information
liamg authored Jan 24, 2022
2 parents e361141 + 01510ad commit 5dc907b
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ It's not required to close tags you've opened, though it can make for easier rea

- `<bold>`
- `<dim>`
- `<italic>`
- `<underline>`
- `<blink>`
- `<reverse>`
Expand Down
2 changes: 2 additions & 0 deletions parser.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ const (
blink
reverse
hidden
italic
)

var resetAll = "\x1b[0m"
Expand All @@ -38,6 +39,7 @@ 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",
Expand Down
1 change: 1 addition & 0 deletions tags.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ var bgTags = map[string]string{
var attrTags = map[string]uint8{
"bold": bold,
"dim": dim,
"italic": italic,
"underline": underline,
"blink": blink,
"reverse": reverse,
Expand Down

0 comments on commit 5dc907b

Please sign in to comment.