From e1bd6064807c1eac08594dafff01c8aa39a107d8 Mon Sep 17 00:00:00 2001 From: bokuweb Date: Wed, 19 Jan 2022 19:59:18 +0900 Subject: [PATCH] 0.0.231 (#414) * fix: ppr reader * 0.0.231 --- CHANGELOG.md | 3 +++ docx-core/examples/reader.rs | 2 +- docx-core/src/reader/paragraph_property.rs | 2 +- docx-wasm/package.json | 2 +- docx-wasm/test/__snapshots__/index.test.js.snap | 4 ++-- 5 files changed, 8 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index dc6966c..0bd8f02 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,9 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## docx-wasm@0.0.231 (19. January, 2022) + +- Fixed a pPr reader. ## docx-wasm@0.0.229 (19. January, 2022) - Fixed a del/ins type in runProperty diff --git a/docx-core/examples/reader.rs b/docx-core/examples/reader.rs index f1b9065..10e7efe 100644 --- a/docx-core/examples/reader.rs +++ b/docx-core/examples/reader.rs @@ -4,7 +4,7 @@ use std::fs::File; use std::io::{Read, Write}; pub fn main() { - let mut file = File::open("./center.docx").unwrap(); + let mut file = File::open("./ppr_del.docx").unwrap(); let mut buf = vec![]; file.read_to_end(&mut buf).unwrap(); diff --git a/docx-core/src/reader/paragraph_property.rs b/docx-core/src/reader/paragraph_property.rs index f105f91..97b644e 100644 --- a/docx-core/src/reader/paragraph_property.rs +++ b/docx-core/src/reader/paragraph_property.rs @@ -93,7 +93,7 @@ impl ElementReader for ParagraphProperty { p.widow_control = Some(true); } XMLElement::ParagraphPropertyChange => { - if let Ok(ppr_change) = ParagraphPropertyChange::read(r, attrs) { + if let Ok(ppr_change) = ParagraphPropertyChange::read(r, &attributes) { p.paragraph_property_change = Some(ppr_change); } } diff --git a/docx-wasm/package.json b/docx-wasm/package.json index c5108c0..f336a08 100644 --- a/docx-wasm/package.json +++ b/docx-wasm/package.json @@ -1,6 +1,6 @@ { "name": "docx-wasm", - "version": "0.0.230", + "version": "0.0.231", "main": "dist/node/index.js", "browser": "dist/web/index.js", "author": "bokuweb ", diff --git a/docx-wasm/test/__snapshots__/index.test.js.snap b/docx-wasm/test/__snapshots__/index.test.js.snap index 6c6e8c5..7df0bd5 100644 --- a/docx-wasm/test/__snapshots__/index.test.js.snap +++ b/docx-wasm/test/__snapshots__/index.test.js.snap @@ -13086,8 +13086,8 @@ Object { "startChars": null, }, "paragraphPropertyChange": Object { - "author": "unnamed", - "date": "1970-01-01T00:00:00Z", + "author": "bokuweb", + "date": "2022-01-07T17:20:00Z", "property": Object { "alignment": "left", "indent": Object {