kordoc 3.2.0 → 3.2.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.
@@ -31,7 +31,7 @@ import {
31
31
  patchHwpxBlocks,
32
32
  renderHtml,
33
33
  scanSectionXml
34
- } from "./chunk-CYLOXVYY.js";
34
+ } from "./chunk-LPKAF45D.js";
35
35
  import {
36
36
  detectFormat,
37
37
  detectOle2Format,
@@ -44,7 +44,7 @@ import {
44
44
  import {
45
45
  VERSION,
46
46
  blocksToMarkdown
47
- } from "./chunk-ZWVTR2HQ.js";
47
+ } from "./chunk-F4A7OTBT.js";
48
48
  import "./chunk-MOL7MDBG.js";
49
49
  export {
50
50
  HwpxSession,
@@ -88,4 +88,4 @@ export {
88
88
  renderHtml,
89
89
  scanSectionXml
90
90
  };
91
- //# sourceMappingURL=-MSRLLJNM.js.map
91
+ //# sourceMappingURL=-NMUBDTYV.js.map
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
 
3
3
  // src/utils.ts
4
- var VERSION = true ? "3.2.0" : "0.0.0-dev";
4
+ var VERSION = true ? "3.2.1" : "0.0.0-dev";
5
5
  function toArrayBuffer(buf) {
6
6
  if (buf.byteOffset === 0 && buf.byteLength === buf.buffer.byteLength) {
7
7
  return buf.buffer;
@@ -634,4 +634,4 @@ export {
634
634
  HEADING_RATIO_H2,
635
635
  HEADING_RATIO_H3
636
636
  };
637
- //# sourceMappingURL=chunk-ZWVTR2HQ.js.map
637
+ //# sourceMappingURL=chunk-F4A7OTBT.js.map
@@ -23,7 +23,7 @@ import {
23
23
  sanitizeHref,
24
24
  stripDtd,
25
25
  toArrayBuffer
26
- } from "./chunk-ZWVTR2HQ.js";
26
+ } from "./chunk-F4A7OTBT.js";
27
27
  import {
28
28
  parsePageRange
29
29
  } from "./chunk-MOL7MDBG.js";
@@ -19364,6 +19364,15 @@ function buildRangeSplices(para, xml, start, end, replacement) {
19364
19364
  }
19365
19365
  return placed ? splices : null;
19366
19366
  }
19367
+ function allLinesegRemovalSplices(xml) {
19368
+ const segRe = /<(\w+:)?linesegarray\b[^>]*?(?:\/>|>[\s\S]*?<\/\1linesegarray>)/g;
19369
+ const splices = [];
19370
+ let m;
19371
+ while ((m = segRe.exec(xml)) !== null) {
19372
+ splices.push({ start: m.index, end: m.index + m[0].length, replacement: "" });
19373
+ }
19374
+ return splices;
19375
+ }
19367
19376
  function applySplices(xml, splices) {
19368
19377
  const sorted = [...splices].sort((a, b) => a.start - b.start);
19369
19378
  for (let i = 1; i < sorted.length; i++) {
@@ -21234,6 +21243,7 @@ async function patchHwpx(original, editedMarkdown, options) {
21234
21243
  try {
21235
21244
  for (let i = 0; i < scans.length; i++) {
21236
21245
  if (sectionSplices[i].length === 0) continue;
21246
+ sectionSplices[i].push(...allLinesegRemovalSplices(scans[i].xml));
21237
21247
  const newXml = applySplices(scans[i].xml, sectionSplices[i]);
21238
21248
  replacements.set(sectionPaths[i], encoder.encode(newXml));
21239
21249
  }
@@ -22951,7 +22961,7 @@ async function parseHwp(buffer, options) {
22951
22961
  async function parsePdf(buffer, options) {
22952
22962
  let parsePdfDocument;
22953
22963
  try {
22954
- const mod = await import("./parser-U6KRTEB7.js");
22964
+ const mod = await import("./parser-HC5NXB3F.js");
22955
22965
  parsePdfDocument = mod.parsePdfDocument;
22956
22966
  } catch {
22957
22967
  return {
@@ -23076,4 +23086,4 @@ export {
23076
23086
  parseHwpml,
23077
23087
  fillForm
23078
23088
  };
23079
- //# sourceMappingURL=chunk-CYLOXVYY.js.map
23089
+ //# sourceMappingURL=chunk-LPKAF45D.js.map