punctilio 4.2.0 → 4.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "punctilio",
3
- "version": "4.2.0",
3
+ "version": "4.3.1",
4
4
  "description": "Smart typography transformations: curly quotes, em-dashes, en-dashes, and more",
5
5
  "type": "module",
6
6
  "sideEffects": false,
package/src/constants.ts CHANGED
@@ -139,23 +139,13 @@ export const REGEX_SPECIAL_CHARS = [".", "*", "+", "?", "^", "$", "[", "]", "\\"
139
139
  */
140
140
  const MAX_BOUNDARY_SEPARATORS = 3
141
141
 
142
- /**
143
- * Marker-aware word boundary pattern for the START of a match.
144
- *
145
- * Standard `\b` can create false boundaries when separator markers appear
146
- * between word characters (e.g., `x\uE000ReLU` has a false `\b` before `R`).
147
- * This pattern uses a negative lookbehind to reject matches preceded by a
148
- * word character followed by up to `MAX_BOUNDARY_SEPARATORS` markers.
149
- */
150
- export function wordBoundaryStart(escapedSeparator: string): string {
151
- return `(?<!\\w${escapedSeparator}{0,${MAX_BOUNDARY_SEPARATORS}})\\b`
152
- }
153
-
154
142
  /**
155
143
  * Marker-aware word boundary pattern for the END of a match.
156
144
  *
157
- * Mirror of `wordBoundaryStart` \u2014 rejects matches followed by up to
158
- * `MAX_BOUNDARY_SEPARATORS` markers and then a word character.
145
+ * Standard `\b` can create false boundaries when separator markers appear
146
+ * between word characters (e.g., `ReLU\uE000x` has a false `\b` after `U`).
147
+ * This pattern rejects matches followed by up to `MAX_BOUNDARY_SEPARATORS`
148
+ * markers and then a word character.
159
149
  */
160
150
  export function wordBoundaryEnd(escapedSeparator: string): string {
161
151
  return `\\b(?!${escapedSeparator}{0,${MAX_BOUNDARY_SEPARATORS}}\\w)`