From 651944b4da0c80a6fd0923165fedcd98c28eea4b Mon Sep 17 00:00:00 2001 From: Domenic Denicola Date: Fri, 25 Dec 2020 15:56:24 -0500 Subject: [PATCH] Hyphenate "second-guess" and derivatives, when appropriate --- lib/convert-worker.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/convert-worker.js b/lib/convert-worker.js index 30add8e..11ed960 100644 --- a/lib/convert-worker.js +++ b/lib/convert-worker.js @@ -655,6 +655,10 @@ function fixHyphens(xml) { // in the books. xml = xml.replace(/hand to hand(?= [a-z])/g, "hand-to-hand"); + // This is usually wrong but sometimes correct. The lookarounds avoid specific cases where it's referring to an actual + // second in a series of guesses. + xml = xml.replace(/(?