@bendyline/squisq-editor-react 2.13.17 → 2.13.18
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/{chunk-LDU3AWER.js → chunk-6GHLTJNG.js} +2 -2
- package/dist/{chunk-4MBH7MMU.js → chunk-F6URHAW6.js} +1 -1
- package/dist/{chunk-EJNCUVPU.js → chunk-MMK26QF7.js} +1 -1
- package/dist/{chunk-ZLKINE4Y.js → chunk-SSEE55FT.js} +2 -7
- package/dist/{chunk-N3EX452F.js → chunk-XUEYPMBH.js} +1966 -1856
- package/dist/index.d.ts +15 -2
- package/dist/index.js +7 -5
- package/dist/json-editor/index.js +3 -3
- package/dist/review/index.js +2 -2
- package/dist/shell/index.js +4 -4
- package/dist/styles/index.css +115 -47
- package/package.json +6 -6
|
@@ -3,11 +3,11 @@ import {
|
|
|
3
3
|
AlignedTableHeader,
|
|
4
4
|
MarkdownEscape,
|
|
5
5
|
PlainTextClipboard
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-F6URHAW6.js";
|
|
7
7
|
import {
|
|
8
8
|
markdownToTiptap,
|
|
9
9
|
tiptapToMarkdown
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-SSEE55FT.js";
|
|
11
11
|
|
|
12
12
|
// src/jsonEditor/JsonEditorContext.tsx
|
|
13
13
|
import { createContext, useContext, useEffect, useMemo } from "react";
|
|
@@ -704,14 +704,12 @@ function tiptapToMarkdown(html) {
|
|
|
704
704
|
const cellRegex = /<(th|td)([^>]*)>(.*?)<\/\1>/gs;
|
|
705
705
|
let cellExec;
|
|
706
706
|
while ((cellExec = cellRegex.exec(rowHtml)) !== null) {
|
|
707
|
-
const tag = cellExec[1];
|
|
708
707
|
const attrs = cellExec[2];
|
|
709
708
|
const content = htmlToTableCell(cellExec[3]);
|
|
710
709
|
const alignExec = attrs.match(/text-align:\s*(left|center|right)/);
|
|
711
710
|
cells.push({
|
|
712
711
|
content,
|
|
713
|
-
align: alignExec ? alignExec[1] : null
|
|
714
|
-
isHeader: tag === "th"
|
|
712
|
+
align: alignExec ? alignExec[1] : null
|
|
715
713
|
});
|
|
716
714
|
}
|
|
717
715
|
if (cells.length > 0) {
|
|
@@ -719,10 +717,7 @@ function tiptapToMarkdown(html) {
|
|
|
719
717
|
}
|
|
720
718
|
}
|
|
721
719
|
if (rows.length > 0) {
|
|
722
|
-
const
|
|
723
|
-
const hIdx = headerIdx >= 0 ? headerIdx : 0;
|
|
724
|
-
const headerRow = rows[hIdx];
|
|
725
|
-
const dataRows = rows.filter((_, i) => i !== hIdx);
|
|
720
|
+
const [headerRow, ...dataRows] = rows;
|
|
726
721
|
const aligns = headerRow.map((c) => c.align);
|
|
727
722
|
lines.push("| " + headerRow.map((c) => c.content || " ").join(" | ") + " |");
|
|
728
723
|
lines.push(
|