This commit is contained in:
xing 2022-09-24 21:52:20 +08:00
parent 7c4fdc9084
commit 993fa3809d
2 changed files with 2 additions and 2 deletions

View File

@ -146,7 +146,7 @@ func CloseHtmlTag(str string) string {
}
tagss = append(tagss, ss)
}
r := SliceMap[string, string](ClearClosedTag(tagss), func(s string) string {
r := SliceMap(ClearClosedTag(tagss), func(s string) string {
return fmt.Sprintf("</%s>", strings.Trim(s, "<>"))
})
return strings.Join(r, "")

View File

@ -83,7 +83,7 @@ func CloseHtmlTag(str string) string {
}
tagss = append(tagss, ss)
}
r := helper.SliceMap[string, string](helper.ClearClosedTag(tagss), func(s string) string {
r := helper.SliceMap(helper.ClearClosedTag(tagss), func(s string) string {
return fmt.Sprintf("</%s>", strings.Trim(s, "<>"))
})
return strings.Join(r, "")