Skip to content

Commit

Permalink
Unordered lists
Browse files Browse the repository at this point in the history
  • Loading branch information
pythonian23 committed May 17, 2022
1 parent 6b9cc26 commit 763500b
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion render.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,9 @@ PartLoop:
}

var tokens = [...]string{
"```", // codeBlock
"```", // codeBlock
"\n* ", // uList
"\n- ", // uList (same variable as above)
"\n\n",
"**", // boldA
"__", // underline
Expand Down Expand Up @@ -106,6 +108,15 @@ func Render(md string) string {
switch part {
case "```":
current.codeBlock = !current.codeBlock
case "\n* ":
fallthrough
case "\n- ":
if header {
headerLevel = 0
header = false
}
out += escape("0", "1") + "\n - " + escape("0")
styleReset = true
case "**":
current.boldA = !current.boldA
case "__":
Expand Down

0 comments on commit 763500b

Please sign in to comment.