Support ppr (#406)

* fix

* fix

* 0.0.222
main
bokuweb 2022-01-14 11:53:39 +09:00 committed by GitHub
parent c8605adc60
commit c857def7ef
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 1033 additions and 12 deletions

View File

@ -19,17 +19,22 @@ export type NumberingPropertyJSON = {
export type ParagraphPropertyJSON = { export type ParagraphPropertyJSON = {
runProperty: RunPropertyJSON; runProperty: RunPropertyJSON;
style: string | null; style?: string | null;
numberingProperty: NumberingPropertyJSON | null; numberingProperty?: NumberingPropertyJSON | null;
alignment: "left" | "center" | "right" | "justified" | "both"; alignment?: "left" | "center" | "right" | "justified" | "both";
indent: IndentJSON | null; indent?: IndentJSON | null;
lineSpacing: LineSpacingJSON | null; lineSpacing?: LineSpacingJSON | null;
divId: string | null; divId?: string | null;
keepNext: boolean; keepNext?: boolean;
keepLines: boolean; keepLines?: boolean;
pageBreakBefore: boolean; pageBreakBefore?: boolean;
windowControl: boolean; windowControl?: boolean;
outlineLvl: number | null; outlineLvl?: number | null;
paragraphPropertyChange?: {
author: string;
date: string;
property: ParagraphPropertyJSON;
};
}; };
export type ParagraphJSON = { export type ParagraphJSON = {

View File

@ -1,6 +1,6 @@
{ {
"name": "docx-wasm", "name": "docx-wasm",
"version": "0.0.221", "version": "0.0.222",
"main": "dist/node/index.js", "main": "dist/node/index.js",
"browser": "dist/web/index.js", "browser": "dist/web/index.js",
"author": "bokuweb <bokuweb12@gmail.com>", "author": "bokuweb <bokuweb12@gmail.com>",

File diff suppressed because it is too large Load Diff

View File

@ -98,6 +98,14 @@ describe("reader", () => {
const json = w.readDocx(buffer); const json = w.readDocx(buffer);
expect(json).toMatchSnapshot(); expect(json).toMatchSnapshot();
}); });
test("should read paragraph property change docx", () => {
const buffer = readFileSync(
"../fixtures/paragraph_property_change/paragraph_property_change.docx"
);
const json = w.readDocx(buffer);
expect(json).toMatchSnapshot();
});
}); });
describe("writer", () => { describe("writer", () => {