mirror of
https://github.com/coalaura/whiskr.git
synced 2025-09-08 00:29:54 +00:00
21 lines
262 B
Go
21 lines
262 B
Go
package main
|
||
|
||
import "strings"
|
||
|
||
var cleaner = strings.NewReplacer(
|
||
"‑", "-",
|
||
"—", "-",
|
||
|
||
"“", "\"",
|
||
"”", "\"",
|
||
"’", "'",
|
||
)
|
||
|
||
func CleanChunk(chunk string) string {
|
||
if !env.Settings.CleanContent {
|
||
return chunk
|
||
}
|
||
|
||
return cleaner.Replace(chunk)
|
||
}
|