diff --git a/lib/convert-worker.js b/lib/convert-worker.js index f3511f6..db0d832 100644 --- a/lib/convert-worker.js +++ b/lib/convert-worker.js @@ -377,12 +377,10 @@ function getBodyXML(chapter, contentEl) { // Place names need to always be capitalized xml = xml.replace(/North end/g, "North End"); - xml = xml.replace(/Stonemast avenue/g, "Stonemast Avenue"); - xml = xml.replace(/Shale avenue/g, "Shale Avenue"); - xml = xml.replace(/Lord street/g, "Lord Street"); - xml = xml.replace(/Slater street/g, "Slater Street"); - xml = xml.replace(/Hollow point/g, "Hollow Point"); - xml = xml.replace(/Cedar point/g, "Cedar Point"); + xml = xml.replace(/(Stonemast|Shale) avenue/g, "$1 Avenue"); + xml = xml.replace(/(Lord|Slater) street/g, "$1 Street"); + xml = xml.replace(/(Hollow|Cedar) point/g, "$1 Point"); + xml = xml.replace(/(Norwalk|Fenway|Stratford) station/g, "$1 Station"); // These are usually not italicized, but sometimes are. Other foreign-language names (like Yàngbǎn) are not // italicized, so we go in the direction of removing the italics.