feat: 完成 DOCX R4 元素级视觉门禁
建立 Chromium、Word 与 WPS 的可编辑内容、段落几何、页眉页脚、封面、媒体和逐页视觉比较链路。 支持封面独立分节、正文页码重启、主题页边距与横向纸张,并将自然分页差异降为诊断项。 修正代码块内边距和折叠表格单元格边框映射,14 套主题生产矩阵与六组布局视觉矩阵通过。
This commit is contained in:
@@ -3,6 +3,7 @@ import { describe, expect, it } from "vitest";
|
||||
import {
|
||||
aggregatePdfTextLines,
|
||||
buildPageContentText,
|
||||
normalizePdfEditableText,
|
||||
normalizePdfText,
|
||||
type PdfTextItemSnapshot,
|
||||
} from "../src/index.js";
|
||||
@@ -39,6 +40,16 @@ describe("PDF 文本行聚合", () => {
|
||||
]);
|
||||
});
|
||||
|
||||
it("将字体 ToUnicode 中的传统户部件归一为简体字符", () => {
|
||||
expect(normalizePdfText("戶⼾")).toBe("户户");
|
||||
});
|
||||
|
||||
it("从可编辑正文契约中移除 Word 自动列表装饰符", () => {
|
||||
expect(normalizePdfEditableText("• 项目一 ◦ 子项 ▪ 末项 WPS")).toBe(
|
||||
"项目一子项末项WPS"
|
||||
);
|
||||
});
|
||||
|
||||
it("只在页眉页脚坐标带识别独立页码", () => {
|
||||
const lines = aggregatePdfTextLines(
|
||||
[
|
||||
|
||||
Reference in New Issue
Block a user