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