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/dist/constants.d.ts +4 -11
- package/dist/constants.d.ts.map +1 -1
- package/dist/constants.js +4 -13
- package/dist/constants.js.map +1 -1
- package/dist/dashes.d.ts +1 -1
- package/dist/dashes.d.ts.map +1 -1
- package/dist/dashes.js +995 -140
- package/dist/dashes.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/prose-view.d.ts +10 -0
- package/dist/prose-view.d.ts.map +1 -1
- package/dist/prose-view.js +81 -39
- package/dist/prose-view.js.map +1 -1
- package/dist/quote-classifier.d.ts +19 -0
- package/dist/quote-classifier.d.ts.map +1 -0
- package/dist/quote-classifier.js +888 -0
- package/dist/quote-classifier.js.map +1 -0
- package/dist/quotes.d.ts +2 -2
- package/dist/quotes.d.ts.map +1 -1
- package/dist/quotes.js +13 -303
- package/dist/quotes.js.map +1 -1
- package/dist/symbols.d.ts.map +1 -1
- package/dist/symbols.js +3 -78
- package/dist/symbols.js.map +1 -1
- package/package.json +1 -1
- package/src/constants.ts +4 -14
- package/src/dashes.ts +1025 -197
- package/src/index.ts +1 -0
- package/src/prose-view.ts +85 -41
- package/src/quote-classifier.ts +948 -0
- package/src/quotes.ts +13 -369
- package/src/symbols.ts +3 -99
package/package.json
CHANGED
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
|
-
*
|
|
158
|
-
* `
|
|
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)`
|