Skip to content

Commit

Permalink
quotes are nothing special
Browse files Browse the repository at this point in the history
  • Loading branch information
retorquere committed Aug 9, 2023
1 parent 101a990 commit 9a29c87
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 15 deletions.
5 changes: 1 addition & 4 deletions test/data/sentenceCase.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"<i>Erratum:</i> “Analyzing the Growth of InₓGa₁₋ₓN/GaN Superlattices in Self-Induced GaN Nanowires by x-Ray Diffraction”": "<i>Erratum:</i> “Analyzing the Growth of InₓGa₁₋ₓN/GaN Superlattices in Self-Induced GaN Nanowires by x-Ray Diffraction",
"<i>Erratum:</i> “Analyzing the Growth of InₓGa₁₋ₓN/GaN Superlattices in Self-Induced GaN Nanowires by x-Ray Diffraction”": "<i>Erratum:</i> “analyzing the growth of InₓGa₁₋ₓN/GaN superlattices in self-induced GaN nanowires by x-ray diffraction",
"<i>Erratum:</i> Analyzing the Growth of In<sub>x</sub>Ga<sub>1</sub>₋<sub>x</sub>N/GaN Superlattices in Self-Induced GaN Nanowires by X-Ray Diffraction": "<i>Erratum:</i> analyzing the growth of In<sub>x</sub>Ga<sub>1</sub>₋<sub>x</sub>N/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",
Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -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"
}
11 changes: 0 additions & 11 deletions utilities.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 || "";
Expand Down

0 comments on commit 9a29c87

Please sign in to comment.