Fix more cases of extra spaces after periods

This commit is contained in:
Domenic Denicola 2020-10-22 22:39:47 -04:00
commit e8921bbbfe

View file

@ -135,7 +135,7 @@ function getBodyXML(chapter, contentEl) {
// If they show up three in a row, then let them live. Otherwise, they die.
// Also remove any run of them after a period.
xml = xml.replace(/([^\xA0])\xA0\xA0?([^\xA0])/g, "$1 $2");
xml = xml.replace(/\.\xA0+\s*/, ". ");
xml = xml.replace(/\.\x20*\xA0[\xA0\x20]*/, ". ");
function fixEms() {
// Fix recurring broken-up or erroneous <em>s