@gmb/bitmark-parser-generator 5.27.0 → 5.28.0

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.
@@ -3,7 +3,7 @@
3
3
  <head>
4
4
  <meta charset="UTF-8" />
5
5
  <meta name="viewport" content="width=device-width, initial-scale=1" />
6
- <title>@gmb/bitmark-parser-generator [16 Jun 2026 at 20:53]</title>
6
+ <title>@gmb/bitmark-parser-generator [28 Jun 2026 at 23:45]</title>
7
7
  <link
8
8
  rel="shortcut icon"
9
9
  href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAMAAACdt4HsAAABrVBMVEUAAAD///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////+O1foceMD///+J0/qK1Pr7/v8Xdr/9///W8P4UdL7L7P0Scr2r4Pyj3vwad8D5/f/2/f+55f3E6f34+/2H0/ojfMKpzOd0rNgQcb3F3O/j9f7c8v6g3Pz0/P/w+v/q+P7n9v6T1/uQ1vuE0vqLut/y+v+Z2fvt+f+15Pzv9fuc2/vR7v2V2Pvd6/bg9P7I6/285/2y4/yp3/zp8vk8i8kqgMT7/P31+fyv4vxGkcz6/P6/6P3j7vfS5PNnpNUxhcbO7f7F6v3O4vHK3/DA2u631Ouy0eqXweKJud5wqthfoNMMbLvY8f73+v2dxeR8sNtTmdDx9/zX6PSjyeaCtd1YnNGX2PuQveCGt95Nls42h8dLlM3F4vBtAAAAM3RSTlMAAyOx0/sKBvik8opWGBMOAe3l1snDm2E9LSb06eHcu5JpHbarfHZCN9CBb08zzkdNS0kYaptYAAAFV0lEQVRYw92X51/aYBDHHS2O2qqttVbrqNq9m+TJIAYIShBkWwqIiCgoWvfeq7Z2/s29hyQNyUcR7LveGwVyXy6XH8/9rqxglLfUPLxVduUor3h0rfp2TYvpivk37929TkG037hffoX0+peVtZQc1589rigVUdXS/ABSAyEmGIO/1XfvldSK8vs3OqB6u3m0nxmIrvgB0dj7rr7Y9IbuF68hnfFaiHA/sxqm0wciIG43P60qKv9WXWc1RXGh/mFESFABTSBi0sNAKzqet17eCtOb3kZIDwxEEU0oAIJGYxNBDhBND29e0rtXXbcpuPmED9IhEAAQ/AXEaF8EPmnrrKsv0LvWR3fg5sWDNAFZOgAgaKvZDogHNU9MFwnnYROkc56RD5CjAbQX9Ow4g7upCsvYu55aSI/Nj0H1akgKQEUM94dwK65hYRmFU9MIcH/fqJYOZYcnuJSU/waKDgTOEVaVKhwrTRP5XzgSpAITYzom7UvkhFX5VutmxeNnWDjjswTKTyfgluNDGbUpWissXhF3s7mlSml+czWkg3D0l1nNjGNjz3myOQOa1KM/jOS6ebdbAVTCi4gljHSFrviza7tOgRWcS0MOUX9zdNgag5w7rRqA44Lzw0hr1WqES36dFliSJFlh2rXIae3FFcDDgKdxrUIDePr8jGcSClV1u7A9xeN0ModY/pHMxmR1EzRh8TJiwqsHmKW0l4FCEZI+jHio+JdPPE9qwQtTRxku2D8sIeRL2LnxWSllANCQGOIiqVHAz2ye2JR0DcH+HoxDkaADLjgxjKQ+AwCX/g0+DNgdG0ukYCONAe+dbc2IAc6fwt1ARoDSezNHxV2Cmzwv3O6lDMV55edBGwGK9n1+x2F8EDfAGCxug8MhpsMEcTEAWf3rx2vZhe/LAmtIn/6apE6PN0ULKgywD9mmdxbmFl3OvD5AS5fW5zLbv/YHmcsBTjf/afDz3MaZTVCfAP9z6/Bw6ycv8EUBWJIn9zYcoAWWlW9+OzO3vkTy8H+RANLmdrpOuYWdZYEXpo+TlCJrW5EARb7fF+bWdqf3hhyZI1nWJQHgznErZhbjoEsWqi8dQNoE294aldzFurwSABL2XXMf9+H1VQGke9exw5P/AnA5Pv5ngMul7LOvO922iwACu8WkCwLCafvM4CeWPxfA8lNHcWZSoi8EwMAIciKX2Z4SWCMAa3snCZ/G4EA8D6CMLNFsGQhkkz/gQNEBbPCbWsxGUpYVu3z8IyNAknwJkfPMEhLyrdi5RTyUVACkw4GSFRNWJNEW+fgPGwHD8/JxnRuLabN4CGNRkAE23na2+VmEAUmrYymSGjMAYqH84YUIyzgzs3XC7gNgH36Vcc4zKY9o9fgPBXUAiHHwVboBHGLiX6Zcjp1f2wu4tvzZKo0ecPnDtQYDQvJXaBeNzce45Fp28ZQLrEZVuFqgBwOalArKXnW1UzlnSusQKJqKYNuz4tOnI6sZG4zanpemv+7ySU2jbA9h6uhcgpfy6G2PahirDZ6zvq6zDduMVFTKvzw8wgyEdelwY9in3XkEPs3osJuwRQ4qTkfzifndg9Gfc4pdsu82+tTnHZTBa2EAMrqr2t43pguc8tNm7JQVQ2S0ukj2d22dhXYP0/veWtwKrCkNoNimAN5+Xr/oLrxswKbVJjteWrX7eR63o4j9q0GxnaBdWgGA5VStpanIjQmEhV0/nVt5VOFUvix6awJhPcAaTEShgrG+iGyvb5a0Ndb1YGHFPEwoqAinoaykaID1o1pdPNu7XsnCKQ3R+hwWIIhGvORcJUBYXe3Xa3vq/mF/N9V13ugufMkfXn+KHsRD0B8AAAAASUVORK5CYII="
@@ -86,7 +86,7 @@ function(){var e="function"==typeof Object.defineProperties?Object.definePropert
86
86
  <body>
87
87
  <div id="app"></div>
88
88
  <script>
89
- window.chartData = [{"label":"bitmark-parser-generator.min.js","isAsset":true,"statSize":1462711,"parsedSize":642933,"gzipSize":121581,"groups":[{"label":"dist/browser/cjs","path":"./dist/browser/cjs","statSize":1456649,"groups":[{"id":922,"label":"index.cjs","path":"./dist/browser/cjs/index.cjs","statSize":1456649,"parsedSize":642820,"gzipSize":121581}],"parsedSize":642820,"gzipSize":121581},{"label":"node_modules/@ncoderz/superenum/dist","path":"./node_modules/@ncoderz/superenum/dist","statSize":6062,"groups":[{"id":722,"label":"index.cjs","path":"./node_modules/@ncoderz/superenum/dist/index.cjs","statSize":6062}],"parsedSize":0,"gzipSize":0}],"isInitialByEntrypoint":{"main":true}}];
89
+ window.chartData = [{"label":"bitmark-parser-generator.min.js","isAsset":true,"statSize":1468817,"parsedSize":645946,"gzipSize":122446,"groups":[{"label":"dist/browser/cjs","path":"./dist/browser/cjs","statSize":1462755,"groups":[{"id":922,"label":"index.cjs","path":"./dist/browser/cjs/index.cjs","statSize":1462755,"parsedSize":645833,"gzipSize":122446}],"parsedSize":645833,"gzipSize":122446},{"label":"node_modules/@ncoderz/superenum/dist","path":"./node_modules/@ncoderz/superenum/dist","statSize":6062,"groups":[{"id":722,"label":"index.cjs","path":"./node_modules/@ncoderz/superenum/dist/index.cjs","statSize":6062}],"parsedSize":0,"gzipSize":0}],"isInitialByEntrypoint":{"main":true}}];
90
90
  window.entrypoints = ["main"];
91
91
  window.defaultSizes = "stat";
92
92
  window.compressionAlgorithm = "gzip";
@@ -1416,6 +1416,8 @@ var propertyKeys = {
1416
1416
  property_externalLinkText: "@externalLinkText",
1417
1417
  property_feedbackEngine: "@feedbackEngine",
1418
1418
  property_feedbackType: "@feedbackType",
1419
+ property_userFeedbackTranslationUrl: "@userFeedbackTranslationUrl",
1420
+ property_userFeedbackContentUrl: "@userFeedbackContentUrl",
1419
1421
  property_flashcardSet: "@flashcardSet",
1420
1422
  property_focusX: "@focusX",
1421
1423
  property_focusY: "@focusY",
@@ -3880,16 +3882,25 @@ var CARDSETS = {
3880
3882
  },
3881
3883
  {
3882
3884
  key: ConfigKey.property_tableRowSpan,
3885
+ // HTML-C2: contribute a `rowspan` attribute onto the enclosing
3886
+ // cell element (`<th>`/`<td>`).
3887
+ htmlKey: { "@el": { "@attr": { rowspan: "$" } } },
3883
3888
  description: "Number of rows the cell spans.",
3884
3889
  format: TagFormat.number
3885
3890
  },
3886
3891
  {
3887
3892
  key: ConfigKey.property_tableColSpan,
3893
+ // HTML-C2: contribute a `colspan` attribute onto the enclosing
3894
+ // cell element (`<th>`/`<td>`).
3895
+ htmlKey: { "@el": { "@attr": { colspan: "$" } } },
3888
3896
  description: "Number of columns the cell spans.",
3889
3897
  format: TagFormat.number
3890
3898
  },
3891
3899
  {
3892
3900
  key: ConfigKey.property_tableScope,
3901
+ // HTML-C2: contribute a `scope` attribute onto the enclosing
3902
+ // cell element (`<th>`/`<td>`).
3903
+ htmlKey: { "@el": { "@attr": { scope: "$" } } },
3893
3904
  description: "Scope attribute for header cells.",
3894
3905
  format: TagFormat.plainText
3895
3906
  },
@@ -4007,6 +4018,9 @@ var CARDSETS = {
4007
4018
  key: ConfigKey.property_tableRowSpan,
4008
4019
  jsonKey: "rowspan",
4009
4020
  exportJsonKey: { rowspan: "$" },
4021
+ // HTML-C2: contribute a `rowspan` attribute onto the enclosing
4022
+ // cell element (`<th>`/`<td>`).
4023
+ htmlKey: { "@el": { "@attr": { rowspan: "$" } } },
4010
4024
  description: "Number of rows the cell spans.",
4011
4025
  format: TagFormat.number
4012
4026
  },
@@ -4014,6 +4028,9 @@ var CARDSETS = {
4014
4028
  key: ConfigKey.property_tableColSpan,
4015
4029
  jsonKey: "colspan",
4016
4030
  exportJsonKey: { colspan: "$" },
4031
+ // HTML-C2: contribute a `colspan` attribute onto the enclosing
4032
+ // cell element (`<th>`/`<td>`).
4033
+ htmlKey: { "@el": { "@attr": { colspan: "$" } } },
4017
4034
  description: "Number of columns the cell spans.",
4018
4035
  format: TagFormat.number
4019
4036
  },
@@ -4021,6 +4038,9 @@ var CARDSETS = {
4021
4038
  key: ConfigKey.property_tableScope,
4022
4039
  jsonKey: "scope",
4023
4040
  exportJsonKey: { scope: "$" },
4041
+ // HTML-C2: contribute a `scope` attribute onto the enclosing
4042
+ // cell element (`<th>`/`<td>`).
4043
+ htmlKey: { "@el": { "@attr": { scope: "$" } } },
4024
4044
  description: "Scope attribute for header cells.",
4025
4045
  format: TagFormat.plainText
4026
4046
  },
@@ -5831,6 +5851,16 @@ var GROUPS = {
5831
5851
  description: "External Id of the translated book",
5832
5852
  format: TagFormat.plainText
5833
5853
  },
5854
+ {
5855
+ key: ConfigKey.property_userFeedbackTranslationUrl,
5856
+ description: "URL to an external feedback form for book translation feedback",
5857
+ format: TagFormat.plainText
5858
+ },
5859
+ {
5860
+ key: ConfigKey.property_userFeedbackContentUrl,
5861
+ description: "URL to an external feedback form for book content feedback",
5862
+ format: TagFormat.plainText
5863
+ },
5834
5864
  {
5835
5865
  key: ConfigKey.property_duration,
5836
5866
  description: "The duration of the book",
@@ -10933,7 +10963,9 @@ var BITS = {
10933
10963
  {
10934
10964
  key: ConfigKey.property_caption,
10935
10965
  description: "Caption for the table image, used to provide a description for the image",
10936
- format: TagFormat.bitmarkText
10966
+ format: TagFormat.bitmarkText,
10967
+ // HTML-10 / HTML-C2: render as the table's `<caption>` (see table bit).
10968
+ htmlKey: { "@el": "caption", "@children": "$" }
10937
10969
  },
10938
10970
  {
10939
10971
  key: ConfigKey.group_backgroundWallpaper,
@@ -12624,7 +12656,12 @@ var BITS = {
12624
12656
  {
12625
12657
  key: ConfigKey.property_caption,
12626
12658
  description: "Caption for the table, used to define the title of the table",
12627
- format: TagFormat.bitmarkText
12659
+ format: TagFormat.bitmarkText,
12660
+ // HTML-10 / HTML-C2: a bit-level caption renders as the table's
12661
+ // `<caption>` — placed inside the idiomatic `<table>` container as
12662
+ // its first child. Outside a table context it falls back to the
12663
+ // residual carrier.
12664
+ htmlKey: { "@el": "caption", "@children": "$" }
12628
12665
  },
12629
12666
  {
12630
12667
  key: ConfigKey.property_tableFixedHeader,
@@ -12709,7 +12746,9 @@ var BITS = {
12709
12746
  {
12710
12747
  key: ConfigKey.property_caption,
12711
12748
  description: "Caption for the table image, used to provide a description for the image",
12712
- format: TagFormat.bitmarkText
12749
+ format: TagFormat.bitmarkText,
12750
+ // HTML-10 / HTML-C2: render as the table's `<caption>` (see table bit).
12751
+ htmlKey: { "@el": "caption", "@children": "$" }
12713
12752
  },
12714
12753
  {
12715
12754
  key: ConfigKey.group_backgroundWallpaper,
@@ -13899,7 +13938,7 @@ var instance2 = new Config();
13899
13938
  // src/generated/package_info.ts
13900
13939
  var PACKAGE_INFO = {
13901
13940
  "name": "@gmb/bitmark-parser-generator",
13902
- "version": "5.27.0",
13941
+ "version": "5.28.0",
13903
13942
  "author": "Get More Brain Ltd",
13904
13943
  "license": "ISC",
13905
13944
  "description": "A bitmark parser and generator using Peggy.js"
@@ -14789,6 +14828,10 @@ var NodeType = {
14789
14828
  relatedBookValue: "relatedBookValue",
14790
14829
  translationOfBook: "translationOfBook",
14791
14830
  translationOfBookValue: "translationOfBookValue",
14831
+ userFeedbackTranslationUrl: "userFeedbackTranslationUrl",
14832
+ userFeedbackTranslationUrlValue: "userFeedbackTranslationUrlValue",
14833
+ userFeedbackContentUrl: "userFeedbackContentUrl",
14834
+ userFeedbackContentUrlValue: "userFeedbackContentUrlValue",
14792
14835
  releaseDate: "releaseDate",
14793
14836
  releaseDateValue: "releaseDateValue",
14794
14837
  releaseKind: "releaseKind",
@@ -27998,6 +28041,18 @@ var Builder = class extends BaseBuilder {
27998
28041
  data.translationOfBook,
27999
28042
  options
28000
28043
  ),
28044
+ userFeedbackTranslationUrl: this.toAstProperty(
28045
+ bitType,
28046
+ ConfigKey.property_userFeedbackTranslationUrl,
28047
+ data.userFeedbackTranslationUrl,
28048
+ options
28049
+ ),
28050
+ userFeedbackContentUrl: this.toAstProperty(
28051
+ bitType,
28052
+ ConfigKey.property_userFeedbackContentUrl,
28053
+ data.userFeedbackContentUrl,
28054
+ options
28055
+ ),
28001
28056
  author: this.toAstProperty(bitType, ConfigKey.property_author, data.author, options),
28002
28057
  subject: this.toAstProperty(bitType, ConfigKey.property_subject, data.subject, options),
28003
28058
  date: this.toAstProperty(bitType, ConfigKey.property_date, data.date, options),
@@ -31789,7 +31844,8 @@ var BitmarkGenerator = class extends AstWalkerGenerator {
31789
31844
  this.writeNL();
31790
31845
  }
31791
31846
  const content = cell.content ?? instance3.EMPTY_STRING;
31792
- this.writeTextOrValue(content, this.textFormat, TextLocation2.body);
31847
+ const options = this.options.noBreakscaping ? { noBreakscaping: true } : void 0;
31848
+ this.writeTextOrValue(content, this.textFormat, TextLocation2.body, options);
31793
31849
  }
31794
31850
  writeTableCellProperty(name, value) {
31795
31851
  this.writeOPA();
@@ -33268,6 +33324,8 @@ var MARK_TO_TAG = {
33268
33324
  highlight: "mark",
33269
33325
  code: "code"
33270
33326
  };
33327
+ var INLINE_IMAGE_RE = /==([^=]*(?:=(?!=)[^=]*)*)==\|imageInline:([^|\s]+)((?:\|(?:@?[A-Za-z][A-Za-z0-9_-]*:[^|\s]+|#[^|\s]*))*)\|?/g;
33328
+ var MAX_IMAGE_DIMENSION = 9999;
33271
33329
  var HtmlTableGenerator = class {
33272
33330
  constructor() {
33273
33331
  __publicField(this, "indentUnit", " ");
@@ -33386,6 +33444,8 @@ var HtmlTableGenerator = class {
33386
33444
  case "image":
33387
33445
  case "imageInline":
33388
33446
  return this.imageToHtml(node);
33447
+ case "latex":
33448
+ return this.latexToHtml(node);
33389
33449
  default:
33390
33450
  return this.inlineToHtml([node]);
33391
33451
  }
@@ -33396,8 +33456,9 @@ var HtmlTableGenerator = class {
33396
33456
  inlineNodeToHtml(node) {
33397
33457
  if (node.type === "hardBreak") return "<br>";
33398
33458
  if (node.type === "image" || node.type === "imageInline") return this.imageToHtml(node);
33459
+ if (node.type === "latex") return this.latexToHtml(node);
33399
33460
  if (node.type === "text") {
33400
- return this.wrapMarks(this.escapeText(node.text ?? ""), node.marks);
33461
+ return this.wrapMarks(this.textToHtml(node.text ?? ""), node.marks);
33401
33462
  }
33402
33463
  if (node.content) return this.inlineToHtml(node.content);
33403
33464
  return this.escapeText(node.text ?? "");
@@ -33475,6 +33536,44 @@ var HtmlTableGenerator = class {
33475
33536
  }
33476
33537
  return `<img ${parts.join(" ")}>`;
33477
33538
  }
33539
+ textToHtml(text) {
33540
+ let html = "";
33541
+ let lastIndex = 0;
33542
+ for (const match of text.matchAll(INLINE_IMAGE_RE)) {
33543
+ const index = match.index ?? 0;
33544
+ html += this.escapeText(text.slice(lastIndex, index));
33545
+ html += this.inlineImageTokenToHtml(match);
33546
+ lastIndex = index + match[0].length;
33547
+ }
33548
+ html += this.escapeText(text.slice(lastIndex));
33549
+ return html;
33550
+ }
33551
+ inlineImageTokenToHtml(match) {
33552
+ const attrs = {
33553
+ alt: match[1],
33554
+ src: match[2]
33555
+ };
33556
+ const rawAttrs = match[3] ?? "";
33557
+ for (const attr of rawAttrs.split("|")) {
33558
+ if (!attr || attr.startsWith("#")) continue;
33559
+ const colon = attr.indexOf(":");
33560
+ if (colon < 1) continue;
33561
+ const key = attr.slice(0, colon).replace(/^@/, "");
33562
+ const value = attr.slice(colon + 1);
33563
+ if (key === "width" || key === "height") {
33564
+ const n = Number.parseInt(value, 10);
33565
+ if (!Number.isNaN(n) && n > 0 && n <= MAX_IMAGE_DIMENSION) attrs[key] = n;
33566
+ } else if (key === "class" || key === "title") {
33567
+ attrs[key] = value;
33568
+ }
33569
+ }
33570
+ return this.imageToHtml({ type: "imageInline", attrs });
33571
+ }
33572
+ // --- formulas -------------------------------------------------------------
33573
+ latexToHtml(node) {
33574
+ const formula = node.attrs?.formula ?? "";
33575
+ return `<math alttext="${this.escapeAttr(formula)}"></math>`;
33576
+ }
33478
33577
  // --- escaping -------------------------------------------------------------
33479
33578
  escapeText(text) {
33480
33579
  return text.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;");
@@ -33786,6 +33885,7 @@ var JsonGenerator = class extends AstWalkerGenerator {
33786
33885
  this.addProperty(this.bitJson, k, values, { array: true });
33787
33886
  }
33788
33887
  }
33888
+ return false;
33789
33889
  }
33790
33890
  // bitmarkAst -> bits -> bitsValue -> cardNode -> cardBits -> cardBitsValue
33791
33891
  enter_cardBitsValue(node, route) {
@@ -42820,7 +42920,7 @@ var IMPLIED_CLOSE = {
42820
42920
  p: /* @__PURE__ */ new Set(["p"]),
42821
42921
  option: /* @__PURE__ */ new Set(["option"])
42822
42922
  };
42823
- var TAG_RE = /<(\/)?([a-zA-Z][a-zA-Z0-9-]*)((?:\s+(?:"[^"]*"|'[^']*'|[^<>"'])*)?)(\/)?>/g;
42923
+ var TAG_RE = /<(\/)?([a-zA-Z][a-zA-Z0-9:-]*)((?:\s+(?:"[^"]*"|'[^']*'|[^<>"'])*)?)(\/)?>/g;
42824
42924
  var ATTR_RE = /([a-zA-Z_:][a-zA-Z0-9:._-]*)(?:\s*=\s*("[^"]*"|'[^']*'|[^\s"'>]+))?/g;
42825
42925
  function parseAttrs(raw) {
42826
42926
  const attrs = {};
@@ -43151,6 +43251,9 @@ var HtmlTableParser = class {
43151
43251
  if (name === "img") {
43152
43252
  return [this.imageNode(el, true)];
43153
43253
  }
43254
+ if (this.isMathTag(name)) {
43255
+ return [this.latexNode(el)];
43256
+ }
43154
43257
  const markType = MARK_TAGS[name];
43155
43258
  if (markType) {
43156
43259
  return this.inlineNodes(el.children, [...marks, { type: markType }]);
@@ -43267,6 +43370,43 @@ var HtmlTableParser = class {
43267
43370
  if (el.attrs.class) attrs.class = el.attrs.class;
43268
43371
  return { type: inline ? "imageInline" : "image", attrs };
43269
43372
  }
43373
+ // --- formulas -------------------------------------------------------------
43374
+ isMathTag(name) {
43375
+ return this.localName(name) === "math";
43376
+ }
43377
+ latexNode(el) {
43378
+ return {
43379
+ type: "latex",
43380
+ attrs: {
43381
+ formula: this.latexFromMath(el)
43382
+ }
43383
+ };
43384
+ }
43385
+ latexFromMath(el) {
43386
+ const alt = el.attrs.alttext ?? el.attrs.alt ?? el.attrs.title;
43387
+ if (alt != null) return decodeEntities(alt);
43388
+ const annotation = this.findLatexAnnotation(el);
43389
+ if (annotation) return this.textContent(annotation).trim();
43390
+ return this.textContent(el).trim();
43391
+ }
43392
+ findLatexAnnotation(el) {
43393
+ for (const child of el.children) {
43394
+ if (!isElement(child)) continue;
43395
+ const lowerEncoding = (child.attrs.encoding ?? "").toLowerCase();
43396
+ if (this.localName(child.name) === "annotation" && (/\btex\b/.test(lowerEncoding) || /\blatex\b/.test(lowerEncoding))) {
43397
+ return child;
43398
+ }
43399
+ const nested = this.findLatexAnnotation(child);
43400
+ if (nested) return nested;
43401
+ }
43402
+ return void 0;
43403
+ }
43404
+ textContent(el) {
43405
+ return el.children.map((child) => isElement(child) ? this.textContent(child) : decodeEntities(child.value)).join("").replace(/\s+/g, " ");
43406
+ }
43407
+ localName(name) {
43408
+ return name.includes(":") ? name.slice(name.indexOf(":") + 1) : name;
43409
+ }
43270
43410
  // --- whitespace -----------------------------------------------------------
43271
43411
  /** Trim leading/trailing whitespace from inline content (edges only). */
43272
43412
  trimInline(nodes) {
@@ -43921,7 +44061,10 @@ var BitmarkParserGenerator = class {
43921
44061
  outputFile: opts.outputFile,
43922
44062
  fileOptions: opts.fileOptions,
43923
44063
  jsonOptions: opts.jsonOptions,
43924
- bitmarkOptions: opts.bitmarkOptions
44064
+ bitmarkOptions: {
44065
+ ...opts.bitmarkOptions,
44066
+ ...opts.noBreakscaping ? { noBreakscaping: true } : {}
44067
+ }
43925
44068
  });
43926
44069
  }
43927
44070
  const outputFormat = opts.outputFormat ?? "html";