Fix hyphenation for high five and fist bump

This commit is contained in:
Domenic Denicola 2020-12-19 17:03:33 -05:00
commit b9d396f6f5
2 changed files with 21 additions and 3 deletions

View file

@ -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-");

View file

@ -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": "Cant fist bump",
"after": "Cant fist-bump",
"_comment": "Here it's a verb"
}
],
"https://www.parahumans.net/2020/01/04/infrared-19-3/": [