speciale spaties -> gewone spaties
This commit is contained in:
@@ -206,6 +206,7 @@ func doArticle(filename string, url string, timestamp time.Time, needUpdate bool
|
||||
// text bevat kopjes zonder punt aan het eind
|
||||
lines := strings.Split(text, "\n")
|
||||
for i, line := range lines {
|
||||
line = fixSpace(line)
|
||||
n := len(line)
|
||||
if n > 0 {
|
||||
if strings.ContainsAny(line[n-1:], ".!?") {
|
||||
@@ -229,7 +230,7 @@ func doArticle(filename string, url string, timestamp time.Time, needUpdate bool
|
||||
x(err)
|
||||
} else {
|
||||
for _, cat := range cats {
|
||||
_, err := fmt.Fprintf(fp, "##META text cat = %s\n", cat)
|
||||
_, err := fmt.Fprintf(fp, "##META text cat = %s\n", fixSpace(cat))
|
||||
x(err)
|
||||
}
|
||||
}
|
||||
@@ -241,3 +242,7 @@ func doArticle(filename string, url string, timestamp time.Time, needUpdate bool
|
||||
|
||||
return true
|
||||
}
|
||||
|
||||
func fixSpace(s string) string {
|
||||
return strings.Join(strings.Fields(s), " ")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user