diff --git a/lib/convert-worker.js b/lib/convert-worker.js index 136db35..db7eedc 100644 --- a/lib/convert-worker.js +++ b/lib/convert-worker.js @@ -598,9 +598,6 @@ function fixMispellings(xml) { // This is commonly misspelled. xml = xml.replace(/([Ss])houlderblade/g, "$1houlder blade"); - // Preemptive(ly) is often hyphenated (not always). It should not be. - xml = xml.replace(/([Pp])re-emptive/g, "$1reemptive"); - // All dictionaries agree this is capitalized. xml = xml.replace(/u-turn/g, "U-turn"); @@ -640,6 +637,13 @@ function fixHyphens(xml) { xml = xml.replace(/([Oo]ne|[Tt]wo|[Tt]hree|[Ff]our|[Ff]ourth) dimensional/g, "$1-dimensional"); xml = xml.replace(/(?<=\b)one on one(?=\b)/g, "one-on-one"); + // Preemptive(ly) is often hyphenated (not always). It should not be. + xml = xml.replace(/([Pp])re-emptive/g, "$1reemptive"); + + // These should be hyphenated only when used as a verb. We correct those cases back in substitutions.json. + xml = xml.replace(/fist-bump/g, "fist bump"); + xml = xml.replace(/high-five/g, "high five"); + // This is usually correct but sometimes wrong. xml = xml.replace(/neo /g, "neo-"); diff --git a/lib/substitutions.json b/lib/substitutions.json index 5fe4175..b2ff494 100644 --- a/lib/substitutions.json +++ b/lib/substitutions.json @@ -6206,6 +6206,10 @@ { "before": "“Cradle—the most intact part of Tattletale said", "after": "“Cradle—” the most intact part of Tattletale said" + }, + { + "before": "backwards-high five", + "after": "backwards high five" } ], "https://www.parahumans.net/2019/01/26/blinding-11-9/": [ @@ -7381,6 +7385,11 @@ { "before": "aunt Rachel", "after": "Aunt Rachel" + }, + { + "before": "for Kenzie to high five", + "after": "for Kenzie to high-five", + "_comment": "Here it's a verb" } ], "https://www.parahumans.net/2019/09/07/from-within-16-8/": [ @@ -8320,6 +8329,11 @@ { "before": "Almost a Figurehead", "after": "Almost a figurehead" + }, + { + "before": "Can’t fist bump", + "after": "Can’t fist-bump", + "_comment": "Here it's a verb" } ], "https://www.parahumans.net/2020/01/04/infrared-19-3/": [