add format string

This commit is contained in:
2026-05-29 08:48:51 +07:00
parent 235faddaa8
commit 813493ffa7
3 changed files with 13 additions and 4 deletions
+8
View File
@@ -40,3 +40,11 @@ func (s *service) FormatText(text string) string {
}
return res.String()
}
func (s *service) FormatString(text string) string {
l := strings.TrimSpace(text)
if strings.HasPrefix(l, "--") {
l = strings.Replace(l, "--", "—", 1)
}
return l
}