diff --git a/test/data/sentenceCase.json b/test/data/sentenceCase.json index 7622704..d1bcfbd 100644 --- a/test/data/sentenceCase.json +++ b/test/data/sentenceCase.json @@ -1,5 +1,5 @@ { - "Erratum: “Analyzing the Growth of InₓGa₁₋ₓN/GaN Superlattices in Self-Induced GaN Nanowires by x-Ray Diffraction”": "Erratum: “Analyzing the Growth of InₓGa₁₋ₓN/GaN Superlattices in Self-Induced GaN Nanowires by x-Ray Diffraction”", + "Erratum: “Analyzing the Growth of InₓGa₁₋ₓN/GaN Superlattices in Self-Induced GaN Nanowires by x-Ray Diffraction”": "Erratum: “analyzing the growth of InₓGa₁₋ₓN/GaN superlattices in self-induced GaN nanowires by x-ray diffraction”", "Erratum: Analyzing the Growth of InxGa1xN/GaN Superlattices in Self-Induced GaN Nanowires by X-Ray Diffraction": "Erratum: analyzing the growth of InxGa1xN/GaN superlattices in self-induced GaN nanowires by X-ray diffraction", "Chapter 3. Putting Ideas into Your Own Words and Paragraphs": "Chapter 3. Putting ideas into your own words and paragraphs", "Structured Interviewing for OCB: Construct Validity, Faking, and the Effects of Question Type": "Structured interviewing for OCB: construct validity, faking, and the effects of question type", @@ -39,7 +39,6 @@ "IJCAI-77": "IJCAI-77", "Understanding Goal-based Stories": "Understanding goal-based stories", "Integrated Processing in Planning and Understanding": "Integrated processing in planning and understanding", - "Rigor Mortis: a response to Nilsson's “Logic and Artificial Intelligence”": "Rigor mortis: a response to nilsson's “Logic and Artificial Intelligence”", "COLING-90": "COLING-90", "A Critical Evaluation of Commensurable Abductive Models for Semantic Interpretation": "A critical evaluation of commensurable abductive models for semantic interpretation", "Non-disjunctive Ambiguity": "Non-disjunctive ambiguity", @@ -770,7 +769,5 @@ "Monte-Carlo Exploration for Deterministic Planning": "Monte-carlo exploration for deterministic planning", "Seventh International Planning Competition": "Seventh international planning competition", "Activity Planning for a Lunar Orbital Mission": "Activity planning for a lunar orbital mission", - "Simulated Penetration Testing: From \"Dijkstra\" to \"Turing Test++\"": "Simulated penetration testing: from \"Dijkstra\" to \"Turing Test++\"", - "The Metric-FF Planning System: Translating \"Ignoring Delete Lists\" to Numeric State Variables": "The metric-FF planning system: translating \"Ignoring Delete Lists\" to numeric state variables", "Essentials of Artificial Intelligence": "Essentials of artificial intelligence" } diff --git a/utilities.js b/utilities.js index 571baf6..ebaabf2 100644 --- a/utilities.js +++ b/utilities.js @@ -121,17 +121,6 @@ var Utilities = { sentenceCase: function (text) { const preserve = []; - // quoted text - text.replace(/“.*?”/g, (match, i) => { - preserve.push({ start: i, end: i + match.length }); - }); - text.replace(/‘.*?’/g, (match, i) => { - preserve.push({ start: i, end: i + match.length }); - }); - text.replace(/(["]).*?\1/g, (match, quote, i) => { - preserve.push({ start: i, end: i + match.length }); - }); - // sub-sentence start text.replace(/([.?!][\s]+)(<[^>]+>)?([\p{Lu}])/ug, (match, end, markup, char, i) => { markup = markup || "";