1
0
mirror of https://github.com/coalaura/whiskr.git synced 2025-09-09 01:09:54 +00:00
Files
whiskr/clean.go

21 lines
262 B
Go
Raw Normal View History

2025-08-14 17:08:45 +02:00
package main
import "strings"
var cleaner = strings.NewReplacer(
"", "-",
"—", "-",
"“", "\"",
"”", "\"",
"", "'",
)
func CleanChunk(chunk string) string {
2025-08-16 15:15:06 +02:00
if !env.Settings.CleanContent {
2025-08-14 17:08:45 +02:00
return chunk
}
return cleaner.Replace(chunk)
}