Compare commits
No commits in common. "fd9985892cd5b091b520c7c29f3110a541fdcb12" and "2f38a07cb55087cfad391997d46dd34ffbc52b99" have entirely different histories.
fd9985892c
...
2f38a07cb5
1 changed files with 1 additions and 7 deletions
|
@ -43,13 +43,7 @@ func StripHTMLTags(text string) string {
|
|||
case html.ErrorToken:
|
||||
return builder.String()
|
||||
case html.TextToken:
|
||||
text := token.Token().String()
|
||||
builder.WriteString(text)
|
||||
case html.StartTagToken:
|
||||
tag := token.Token().String()
|
||||
if tag == "<br>" {
|
||||
builder.WriteString("\n")
|
||||
}
|
||||
builder.WriteString(token.Token().Data + " ")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue