From 5ff6621b31a000c194f46f9d9426b5af91ec78fa Mon Sep 17 00:00:00 2001 From: Domenic Denicola Date: Sat, 19 Dec 2020 14:44:29 -0500 Subject: [PATCH] Hyphenate a variety of words starting with "self-" Previously we only did self-conscious; this brings along self-esteem, self-loathing, and self-harm. --- lib/convert-worker.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/convert-worker.js b/lib/convert-worker.js index 1cd668f..bf9c938 100644 --- a/lib/convert-worker.js +++ b/lib/convert-worker.js @@ -627,7 +627,7 @@ function fixHyphens(xml) { xml = xml.replace(/creepy crawl/g, "creepy-crawl"); xml = xml.replace(/well armed/g, "well-armed"); xml = xml.replace(/able bodied/g, "able-bodied"); - xml = xml.replace(/self conscious/g, "self-conscious"); + xml = xml.replace(/self (conscious|esteem|loathing|harm)/g, "self-$1"); 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");