@bendyline/squisq-editor-react 2.11.3 → 2.11.5

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.
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  NarrationStage,
3
3
  useNarrationStage
4
- } from "./chunk-PMNNJYFD.js";
4
+ } from "./chunk-34FRFDQ6.js";
5
5
 
6
6
  // src/teleprompter/TeleprompterView.tsx
7
7
  import { jsx } from "react/jsx-runtime";
@@ -10,8 +10,8 @@ var RE_BOLD_UNDER = /(?<![\p{L}\p{N}_])__(?![\s_])(.+?)(?<![\s_])__(?![\p{L}\p{N
10
10
  var RE_ITALIC_STAR = /\*(?![\s*])(.+?)(?<![\s*])\*/g;
11
11
  var RE_ITALIC_UNDER = /(?<![\p{L}\p{N}_])_(?![\s_])(.+?)(?<![\s_])_(?![\p{L}\p{N}_])/gu;
12
12
  var RE_STRIKETHROUGH = /~~(.+?)~~/g;
13
- var RE_LEGACY_BOLD_STAR = /\*\*(?![\s*])(.+?)(?<![\s*])([ \t]+)\*\*(?=$|[^\s*])/g;
14
- var RE_LEGACY_ITALIC_STAR = /(?<!\*)\*(?![\s*])(.+?)(?<![\s*])([ \t]+)\*(?=$|[^\s*])/g;
13
+ var RE_LEGACY_BOLD_STAR = /\*\*(?![\s*])((?:(?!\*\*).)+?)(?<![\s*])([ \t]+)\*\*(?=$|[^\s*])/g;
14
+ var RE_LEGACY_ITALIC_STAR = /(?<!\*)\*(?![\s*])([^*]+?)(?<![\s*])([ \t]+)\*(?=$|[^\s*])/g;
15
15
  var ESCAPABLE_MD_CHARS = ["*", "_", "~", "\\"];
16
16
  var RE_MD_ESCAPE = /\\([*_~\\])/g;
17
17
  var RE_INLINE_CODE = /`(.+?)`/g;
@@ -445,7 +445,7 @@ function tiptapToMarkdown(html) {
445
445
  while ((cellExec = cellRegex.exec(rowHtml)) !== null) {
446
446
  const tag = cellExec[1];
447
447
  const attrs = cellExec[2];
448
- const content = htmlToTableCell(cellExec[3].replace(/<\/?p>/g, ""));
448
+ const content = htmlToTableCell(cellExec[3]);
449
449
  const alignExec = attrs.match(/text-align:\s*(left|center|right)/);
450
450
  cells.push({
451
451
  content,
@@ -1075,7 +1075,8 @@ function htmlToInline(html) {
1075
1075
  return restoreLeadingSpaces(unescapeHtml(result));
1076
1076
  }
1077
1077
  function htmlToTableCell(html) {
1078
- return htmlToInline(html).replace(/ {2}\n/g, "<br>");
1078
+ const withParagraphBreaks = html.replace(/<\/p>\s*<p(?:\s[^>]*)?>/gi, "<br>").replace(/^\s*<p(?:\s[^>]*)?>/i, "").replace(/<\/p>\s*$/i, "");
1079
+ return htmlToInline(withParagraphBreaks).replace(/ {2}\n/g, "<br>");
1079
1080
  }
1080
1081
  function preserveLeadingSpaces(html) {
1081
1082
  return html.replace(/^ +/, (spaces) => "&nbsp;".repeat(spaces.length));
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  markdownToTiptap,
3
3
  tiptapToMarkdown
4
- } from "./chunk-A2W4GYPG.js";
4
+ } from "./chunk-ES6CPRCW.js";
5
5
 
6
6
  // src/jsonEditor/JsonEditorContext.tsx
7
7
  import { createContext, useContext, useEffect, useMemo } from "react";