Hyphenate spelled out numbers from 11 through 99
This commit is contained in:
parent
85b5e142da
commit
16ef1836da
2 changed files with 11 additions and 5 deletions
|
|
@ -543,6 +543,12 @@ function fixHyphens(xml) {
|
|||
xml = xml.replace(/(\w+)[ -]year[ -]old(s?)(?!\w)/g, "$1-year-old$2");
|
||||
xml = xml.replace(/(\w+) or (\w+)-year-old/g, "$1- or $2-year-old");
|
||||
|
||||
// Compound numbers must be hyphenated.
|
||||
xml = xml.replace(
|
||||
/(?<!\w)(twenty|thirty|fourty|fifty|sixty|seventy|eighty|ninety) (one|two|three|four|five|six|seven|eight|nine)/ig,
|
||||
"$1-$2"
|
||||
);
|
||||
|
||||
// These are consistently missing hyphens.
|
||||
xml = xml.replace(/self destruct/g, "self-destruct");
|
||||
xml = xml.replace(/life threatening/g, "life-threatening");
|
||||
|
|
|
|||
|
|
@ -787,10 +787,6 @@
|
|||
"before": "Walk or-",
|
||||
"after": "Walk or—"
|
||||
},
|
||||
{
|
||||
"before": "twenty six years",
|
||||
"after": "twenty-six years"
|
||||
},
|
||||
{
|
||||
"before": "<em>here? Now?</em>",
|
||||
"after": "<em>here</em>? <em>Now</em>?"
|
||||
|
|
@ -1886,7 +1882,7 @@
|
|||
"after": "my ‘candy’</em>"
|
||||
},
|
||||
{
|
||||
"before": "Thirty Nine point",
|
||||
"before": "Thirty-Nine point",
|
||||
"after": "Thirty-nine point"
|
||||
},
|
||||
{
|
||||
|
|
@ -3516,6 +3512,10 @@
|
|||
{
|
||||
"before": "a burst of alarm</em>.",
|
||||
"after": "a burst of alarm.</em>"
|
||||
},
|
||||
{
|
||||
"before": "Up from Eighty-three point four percent",
|
||||
"after": "Up from eighty-three point four percent"
|
||||
}
|
||||
],
|
||||
"https://parahumans.wordpress.com/2013/07/23/sting-26-3/": [
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue