Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
hownowstephen committed Jul 31, 2023
1 parent 8e28ceb commit 4cab41a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tree.go
Original file line number Diff line number Diff line change
Expand Up @@ -319,7 +319,7 @@ func (t *TreeConverter) fixSpacing(text string) string {
var inList = (processed[0] == '*' && processed[1] == ' ')

tidyLoop:
for i := 2; i < len(text)-1; i++ {
for i := 2; i < len(text); i++ {

switch processed[idx] {
case '\n':
Expand All @@ -344,7 +344,7 @@ tidyLoop:
}
}

if text[i] == '*' && text[i+1] == ' ' {
if text[i-1] == '*' && text[i] == ' ' {
inList = true
} else {
inList = false
Expand All @@ -364,7 +364,7 @@ tidyLoop:
idx++
}

return string(append(processed, text[len(text)-1]))
return string(processed)
}

func getAttr(n *html.Node, name string) string {
Expand Down

0 comments on commit 4cab41a

Please sign in to comment.