tags; .De -> . De

This commit is contained in:
Peter Kleiweg
2026-05-29 12:22:57 +02:00
parent 66581d4e98
commit ca4e7af8fa
21 changed files with 123 additions and 22 deletions

View File

@@ -11,8 +11,10 @@ import (
)
var (
p = e.PanicErr
reEOL = regexp.MustCompile(`[.!?]['"”’]?$`)
p = e.PanicErr
reEOL = regexp.MustCompile(`[.!?]['"”’]?$`)
reNEOL = regexp.MustCompile(`[.!?]['"”’]?\p{Lu}\p{Ll}`)
reLET = regexp.MustCompile(`\p{Lu}`)
)
func AddEnd(s string) string {
@@ -27,7 +29,12 @@ func AddEnd(s string) string {
}
func FixSpace(s string) string {
return strings.Join(strings.Fields(s), " ")
s = strings.Join(strings.Fields(s), " ")
s = reNEOL.ReplaceAllStringFunc(s, func(s1 string) string {
i := reLET.FindStringIndex(s1)[0]
return s1[:i] + " " + s1[i:]
})
return s
}
func MkLock(filename string) {