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.
- package/dist/{-MSRLLJNM.js → -NMUBDTYV.js} +3 -3
- package/dist/{chunk-ZWVTR2HQ.js → chunk-F4A7OTBT.js} +2 -2
- package/dist/{chunk-CYLOXVYY.js → chunk-LPKAF45D.js} +13 -3
- package/dist/{chunk-CYLOXVYY.js.map → chunk-LPKAF45D.js.map} +1 -1
- package/dist/{chunk-7KFBGOXZ.js → chunk-Q7IWG4E3.js} +2 -2
- package/dist/{chunk-SWEBVX5K.cjs → chunk-ZY524HB6.cjs} +2 -2
- package/dist/{chunk-SWEBVX5K.cjs.map → chunk-ZY524HB6.cjs.map} +1 -1
- package/dist/cli.js +4 -4
- package/dist/index.cjs +116 -106
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +0 -1
- package/dist/index.d.ts +0 -1
- package/dist/index.js +12 -2
- package/dist/index.js.map +1 -1
- package/dist/mcp.js +3 -3
- package/dist/{parser-LKIUKZJV.cjs → parser-CV3FOVOS.cjs} +14 -14
- package/dist/{parser-LKIUKZJV.cjs.map → parser-CV3FOVOS.cjs.map} +1 -1
- package/dist/{parser-U6KRTEB7.js → parser-HC5NXB3F.js} +2 -2
- package/dist/{parser-HAWIRFS4.js → parser-ZWGQCMRS.js} +2 -2
- package/dist/{watch-OKZAU3I5.js → watch-IUEQDWC3.js} +3 -3
- package/package.json +1 -1
- /package/dist/{-MSRLLJNM.js.map → -NMUBDTYV.js.map} +0 -0
- /package/dist/{chunk-ZWVTR2HQ.js.map → chunk-F4A7OTBT.js.map} +0 -0
- /package/dist/{chunk-7KFBGOXZ.js.map → chunk-Q7IWG4E3.js.map} +0 -0
- /package/dist/{parser-U6KRTEB7.js.map → parser-HC5NXB3F.js.map} +0 -0
- /package/dist/{parser-HAWIRFS4.js.map → parser-ZWGQCMRS.js.map} +0 -0
- /package/dist/{watch-OKZAU3I5.js.map → watch-IUEQDWC3.js.map} +0 -0
|
@@ -31,7 +31,7 @@ import {
|
|
|
31
31
|
patchHwpxBlocks,
|
|
32
32
|
renderHtml,
|
|
33
33
|
scanSectionXml
|
|
34
|
-
} from "./chunk-
|
|
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-
|
|
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=-
|
|
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.
|
|
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-
|
|
637
|
+
//# sourceMappingURL=chunk-F4A7OTBT.js.map
|
|
@@ -23,7 +23,7 @@ import {
|
|
|
23
23
|
sanitizeHref,
|
|
24
24
|
stripDtd,
|
|
25
25
|
toArrayBuffer
|
|
26
|
-
} from "./chunk-
|
|
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-
|
|
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-
|
|
23089
|
+
//# sourceMappingURL=chunk-LPKAF45D.js.map
|