Skip to content

Commit

Permalink
comments
Browse files Browse the repository at this point in the history
  • Loading branch information
nmalzieu committed Oct 25, 2024
1 parent 04f11ba commit c55753b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions utils/regex.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
const BOUNDARY_START_LOOKBEHIND = /(\s|\(|"|')/.source; // Either a space or a (
const BOUNDARY_START_LOOKBEHIND = /(\s|\(|"|')/.source; // Either a space or a (, or a " or a '
const BOUNDARY_START = new RegExp(`(?<=${BOUNDARY_START_LOOKBEHIND})|^`).source; // It must be start of the line or be preceded by lookbehind
const BOUNDARY_END_LOOKAHEAD = /(\s|\)|$|\.|!|\?|\r\n|\r|\n|"|')/.source; // Either a space, the end of the text, or a ), a ., a !, a ?, a line break
const BOUNDARY_END_LOOKAHEAD = /(\s|\)|$|\.|!|\?|\r\n|\r|\n|"|')/.source; // Either a space, the end of the text, or a ), a ., a !, a ?, a line break, or a " or a '
const BOUNDARY_END = new RegExp(`(?=${BOUNDARY_END_LOOKAHEAD})`).source;
const WORD_CONTENT = /[^()/\s]/.source; // Not a space, not a ( or ), not a /

Expand Down

0 comments on commit c55753b

Please sign in to comment.