generated from VLADIMIR/template
add format test
This commit is contained in:
@@ -24,6 +24,9 @@ func (s *service) FormatText(text string) string {
|
||||
var res strings.Builder
|
||||
for i, line := range lines {
|
||||
l := strings.TrimSpace(line)
|
||||
if strings.HasPrefix(l, "--") {
|
||||
l = strings.Replace(l, "--", "—", 1)
|
||||
}
|
||||
if i == 0 && strings.HasPrefix(l, "—") {
|
||||
res.WriteString(" ")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user