@tiptap/extension-table 3.30.0 → 3.30.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/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/kit/index.cjs +1 -1
- package/dist/kit/index.cjs.map +1 -1
- package/dist/kit/index.js +1 -1
- package/dist/kit/index.js.map +1 -1
- package/dist/table/index.cjs +1 -1
- package/dist/table/index.cjs.map +1 -1
- package/dist/table/index.js +1 -1
- package/dist/table/index.js.map +1 -1
- package/package.json +5 -5
- package/src/table/utilities/markdown.ts +5 -1
|
@@ -41,9 +41,13 @@ export function escapeTableCellPipes(line: string): string {
|
|
|
41
41
|
while (j + closeLen < line.length && line[j + closeLen] === '`') closeLen += 1
|
|
42
42
|
if (closeLen === runLen) {
|
|
43
43
|
const spanContent = line.slice(i + runLen, j)
|
|
44
|
+
// Matches an already-escaped pipe (`\|`, kept as-is) or a bare pipe
|
|
45
|
+
// (escaped). Deliberately avoids a negative lookbehind assertion:
|
|
46
|
+
// WebKit before Safari 16.4 cannot parse lookbehind, and a regex
|
|
47
|
+
// literal fails the whole chunk at parse time, not at call time.
|
|
44
48
|
result +=
|
|
45
49
|
line.slice(i, i + runLen) +
|
|
46
|
-
spanContent.replace(
|
|
50
|
+
spanContent.replace(/\\\||\|/g, match => (match === '|' ? '\\|' : match)) +
|
|
47
51
|
line.slice(j, j + runLen)
|
|
48
52
|
i = j + runLen
|
|
49
53
|
found = true
|