Skip to content

Commit

Permalink
馃悰 Fix char escaping
Browse files Browse the repository at this point in the history
  • Loading branch information
surfinzap committed Dec 23, 2023
1 parent d0004ca commit 4c44e4d
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions src/lib/punctuation/period.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,14 @@
/* replace 2 periods at the end of the sentence with a single period */
export function removeExtraPeriod(string) {
return string.replace(/\.{2}(?![
/\\])/g, ".");


return string.replace(
new RegExp(
"\\.{2}(?![\\\\/])",
"g"
),
"."
);
}

export function fixPeriod(string) {
Expand Down

0 comments on commit 4c44e4d

Please sign in to comment.