Hyphenate "hand-to-hand"

This commit is contained in:
Domenic Denicola 2020-12-19 17:11:34 -05:00
commit aa9fc197e9

View file

@ -647,6 +647,11 @@ function fixHyphens(xml) {
xml = xml.replace(/fist-bump/g, "fist bump");
xml = xml.replace(/high-five/g, "high five");
// This should be hyphenated when used as an adjective (instead of an adverb or noun). I.e. it should be
// "hand-to-hand combat", but "passed from hand to hand", and "capable in hand to hand". The following heuristic works
// in the books.
xml = xml.replace(/hand to hand(?= [a-z])/g, "hand-to-hand");
// This is usually correct but sometimes wrong.
xml = xml.replace(/neo /g, "neo-");