kordoc 3.2.0 → 3.3.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.
- package/dist/{-MSRLLJNM.js → -RAVJL5UK.js} +3 -3
- package/dist/{chunk-7KFBGOXZ.js → chunk-ESBGMBRF.js} +2 -2
- package/dist/{chunk-SWEBVX5K.cjs → chunk-FUB2BGXV.cjs} +2 -2
- package/dist/{chunk-SWEBVX5K.cjs.map → chunk-FUB2BGXV.cjs.map} +1 -1
- package/dist/{chunk-ZWVTR2HQ.js → chunk-HNUFTEV5.js} +2 -2
- package/dist/{chunk-CYLOXVYY.js → chunk-J72F7FIT.js} +13 -3
- package/dist/{chunk-CYLOXVYY.js.map → chunk-J72F7FIT.js.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 +59 -4
- package/dist/mcp.js.map +1 -1
- package/dist/{parser-U6KRTEB7.js → parser-DADWQYCQ.js} +2 -2
- package/dist/{parser-HAWIRFS4.js → parser-FLE2ZPAW.js} +2 -2
- package/dist/{parser-LKIUKZJV.cjs → parser-YWKNDGKI.cjs} +14 -14
- package/dist/{parser-LKIUKZJV.cjs.map → parser-YWKNDGKI.cjs.map} +1 -1
- package/dist/{watch-OKZAU3I5.js → watch-6QPQU277.js} +3 -3
- package/package.json +1 -1
- /package/dist/{-MSRLLJNM.js.map → -RAVJL5UK.js.map} +0 -0
- /package/dist/{chunk-7KFBGOXZ.js.map → chunk-ESBGMBRF.js.map} +0 -0
- /package/dist/{chunk-ZWVTR2HQ.js.map → chunk-HNUFTEV5.js.map} +0 -0
- /package/dist/{parser-U6KRTEB7.js.map → parser-DADWQYCQ.js.map} +0 -0
- /package/dist/{parser-HAWIRFS4.js.map → parser-FLE2ZPAW.js.map} +0 -0
- /package/dist/{watch-OKZAU3I5.js.map → watch-6QPQU277.js.map} +0 -0
package/dist/index.d.cts
CHANGED
|
@@ -616,7 +616,6 @@ declare function buildParagraphSplices(para: ScanParagraph, newText: string, xml
|
|
|
616
616
|
* 오프셋 정합이 깨지므로 null을 반환한다 (호출자가 폴백 결정).
|
|
617
617
|
*/
|
|
618
618
|
declare function buildRangeSplices(para: ScanParagraph, xml: string, start: number, end: number, replacement: string): SpliceEdit[] | null;
|
|
619
|
-
/** splice 일괄 적용 — 겹침 검증 후 뒤에서부터 치환 */
|
|
620
619
|
declare function applySplices(xml: string, splices: SpliceEdit[]): string;
|
|
621
620
|
|
|
622
621
|
/**
|
package/dist/index.d.ts
CHANGED
|
@@ -616,7 +616,6 @@ declare function buildParagraphSplices(para: ScanParagraph, newText: string, xml
|
|
|
616
616
|
* 오프셋 정합이 깨지므로 null을 반환한다 (호출자가 폴백 결정).
|
|
617
617
|
*/
|
|
618
618
|
declare function buildRangeSplices(para: ScanParagraph, xml: string, start: number, end: number, replacement: string): SpliceEdit[] | null;
|
|
619
|
-
/** splice 일괄 적용 — 겹침 검증 후 뒤에서부터 치환 */
|
|
620
619
|
declare function applySplices(xml: string, splices: SpliceEdit[]): string;
|
|
621
620
|
|
|
622
621
|
/**
|
package/dist/index.js
CHANGED
|
@@ -17,7 +17,7 @@ import {
|
|
|
17
17
|
sanitizeHref,
|
|
18
18
|
stripDtd,
|
|
19
19
|
toArrayBuffer
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-ESBGMBRF.js";
|
|
21
21
|
import {
|
|
22
22
|
parsePageRange
|
|
23
23
|
} from "./chunk-GE43BE46.js";
|
|
@@ -19582,6 +19582,15 @@ function buildRangeSplices(para, xml, start, end, replacement) {
|
|
|
19582
19582
|
}
|
|
19583
19583
|
return placed ? splices : null;
|
|
19584
19584
|
}
|
|
19585
|
+
function allLinesegRemovalSplices(xml) {
|
|
19586
|
+
const segRe = /<(\w+:)?linesegarray\b[^>]*?(?:\/>|>[\s\S]*?<\/\1linesegarray>)/g;
|
|
19587
|
+
const splices = [];
|
|
19588
|
+
let m;
|
|
19589
|
+
while ((m = segRe.exec(xml)) !== null) {
|
|
19590
|
+
splices.push({ start: m.index, end: m.index + m[0].length, replacement: "" });
|
|
19591
|
+
}
|
|
19592
|
+
return splices;
|
|
19593
|
+
}
|
|
19585
19594
|
function applySplices(xml, splices) {
|
|
19586
19595
|
const sorted = [...splices].sort((a, b) => a.start - b.start);
|
|
19587
19596
|
for (let i = 1; i < sorted.length; i++) {
|
|
@@ -21452,6 +21461,7 @@ async function patchHwpx(original, editedMarkdown, options) {
|
|
|
21452
21461
|
try {
|
|
21453
21462
|
for (let i = 0; i < scans.length; i++) {
|
|
21454
21463
|
if (sectionSplices[i].length === 0) continue;
|
|
21464
|
+
sectionSplices[i].push(...allLinesegRemovalSplices(scans[i].xml));
|
|
21455
21465
|
const newXml = applySplices(scans[i].xml, sectionSplices[i]);
|
|
21456
21466
|
replacements.set(sectionPaths[i], encoder.encode(newXml));
|
|
21457
21467
|
}
|
|
@@ -23169,7 +23179,7 @@ async function parseHwp(buffer, options) {
|
|
|
23169
23179
|
async function parsePdf(buffer, options) {
|
|
23170
23180
|
let parsePdfDocument;
|
|
23171
23181
|
try {
|
|
23172
|
-
const mod = await import("./parser-
|
|
23182
|
+
const mod = await import("./parser-FLE2ZPAW.js");
|
|
23173
23183
|
parsePdfDocument = mod.parsePdfDocument;
|
|
23174
23184
|
} catch {
|
|
23175
23185
|
return {
|