1

remove duplicate newlines in definitions

this prevents entries from have empty lines which are particularly
annoying when using the popup dictionary in yomichan
This commit is contained in:
Randy Palamar 2022-07-28 20:37:58 -06:00
parent 94326126d3
commit 5b8481e5bf

View File

@ -68,6 +68,8 @@ func epwingExportDb(inputPath, outputPath, language, title string, stride int, p
str = strings.Replace(str, matches[0], replacement, -1)
}
pattern := regexp.MustCompile("\n+")
str = pattern.ReplaceAllLiteralString(str, "\n")
return str
}