0.0.276 rc10 (#527)

* fix: hrule

* fix
main
bokuweb 2022-08-26 15:40:09 +09:00 committed by GitHub
parent df9bd36132
commit 333e012e73
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 19 additions and 15 deletions

View File

@ -5,6 +5,10 @@ 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/), 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). and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## docx-wasm@0.0.276-rc12 (26. Aug, 2022)
- [BugFix] Fixed a bug, hRule is not read in reader.
## docx-wasm@0.0.276-rc11 (25. Aug, 2022) ## docx-wasm@0.0.276-rc11 (25. Aug, 2022)
- [Breaking] change table row `hightRule` to `auto` in reader. - [Breaking] change table row `hightRule` to `auto` in reader.

View File

@ -55,13 +55,6 @@ impl ElementReader for TableRow {
width_before = Some(v.0 as f32); width_before = Some(v.0 as f32);
} }
} }
XMLElement::HeightRule => {
if let Some(v) = read_val(&attributes) {
if let Ok(r) = HeightRule::from_str(&v) {
height_rule = Some(r);
}
}
}
XMLElement::TableRowHeight => { XMLElement::TableRowHeight => {
if let Some(v) = read_val(&attributes) { if let Some(v) = read_val(&attributes) {
let h = f32::from_str(&v); let h = f32::from_str(&v);
@ -69,6 +62,13 @@ impl ElementReader for TableRow {
row_height = Some(h); row_height = Some(h);
} }
} }
if let Some(v) = read(&attributes, "hRule") {
let h = HeightRule::from_str(&v);
if let Ok(h) = h {
height_rule = Some(h);
}
}
} }
XMLElement::Delete => { XMLElement::Delete => {
if let Ok(d) = Delete::read(r, &attributes) { if let Ok(d) = Delete::read(r, &attributes) {

View File

@ -1,6 +1,6 @@
{ {
"name": "docx-wasm", "name": "docx-wasm",
"version": "0.0.276-rc11", "version": "0.0.276-rc12",
"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>",

View File

@ -8583,7 +8583,7 @@ Object {
"property": Object { "property": Object {
"gridAfter": 1, "gridAfter": 1,
"gridBefore": null, "gridBefore": null,
"heightRule": "auto", "heightRule": "exact",
"rowHeight": 55, "rowHeight": 55,
"widthAfter": 1065, "widthAfter": 1065,
"widthBefore": null, "widthBefore": null,
@ -8933,7 +8933,7 @@ Object {
"property": Object { "property": Object {
"gridAfter": 2, "gridAfter": 2,
"gridBefore": null, "gridBefore": null,
"heightRule": "auto", "heightRule": "exact",
"rowHeight": 397, "rowHeight": 397,
"widthAfter": 3717, "widthAfter": 3717,
"widthBefore": null, "widthBefore": null,
@ -9107,7 +9107,7 @@ Object {
"property": Object { "property": Object {
"gridAfter": 2, "gridAfter": 2,
"gridBefore": null, "gridBefore": null,
"heightRule": "auto", "heightRule": "exact",
"rowHeight": 397, "rowHeight": 397,
"widthAfter": 3717, "widthAfter": 3717,
"widthBefore": null, "widthBefore": null,
@ -9360,7 +9360,7 @@ Object {
"property": Object { "property": Object {
"gridAfter": 2, "gridAfter": 2,
"gridBefore": null, "gridBefore": null,
"heightRule": "auto", "heightRule": "exact",
"rowHeight": 397, "rowHeight": 397,
"widthAfter": 3717, "widthAfter": 3717,
"widthBefore": null, "widthBefore": null,
@ -9613,7 +9613,7 @@ Object {
"property": Object { "property": Object {
"gridAfter": 2, "gridAfter": 2,
"gridBefore": null, "gridBefore": null,
"heightRule": "auto", "heightRule": "exact",
"rowHeight": 397, "rowHeight": 397,
"widthAfter": 3717, "widthAfter": 3717,
"widthBefore": null, "widthBefore": null,
@ -9854,7 +9854,7 @@ Object {
"property": Object { "property": Object {
"gridAfter": 2, "gridAfter": 2,
"gridBefore": null, "gridBefore": null,
"heightRule": "auto", "heightRule": "exact",
"rowHeight": 397, "rowHeight": 397,
"widthAfter": 3717, "widthAfter": 3717,
"widthBefore": null, "widthBefore": null,
@ -10107,7 +10107,7 @@ Object {
"property": Object { "property": Object {
"gridAfter": 2, "gridAfter": 2,
"gridBefore": null, "gridBefore": null,
"heightRule": "auto", "heightRule": "exact",
"rowHeight": 397, "rowHeight": 397,
"widthAfter": 3717, "widthAfter": 3717,
"widthBefore": null, "widthBefore": null,