diff --git a/docx-core/src/reader/run.rs b/docx-core/src/reader/run.rs index f1368e2..122f8e9 100644 --- a/docx-core/src/reader/run.rs +++ b/docx-core/src/reader/run.rs @@ -31,8 +31,26 @@ impl ElementReader for Run { }) => { let e = XMLElement::from_str(&name.local_name).unwrap(); match e { - XMLElement::Tab => run = run.add_tab(), - XMLElement::Bold => run = run.bold(), + XMLElement::Tab => { + run = { + if let Some(v) = &attributes.get(0) { + if &v.value == "0" { + continue; + } + } + run.add_tab() + } + } + XMLElement::Bold => { + run = { + if let Some(v) = &attributes.get(0) { + if &v.value == "0" { + continue; + } + } + run.bold() + } + } XMLElement::Highlight => run = run.highlight(attributes[0].value.clone()), XMLElement::Color => run = run.color(attributes[0].value.clone()), XMLElement::Size => run = run.size(usize::from_str(&attributes[0].value)?), diff --git a/docx-wasm/package.json b/docx-wasm/package.json index e097985..71c9c40 100644 --- a/docx-wasm/package.json +++ b/docx-wasm/package.json @@ -1,6 +1,6 @@ { "name": "docx-wasm", - "version": "0.0.40", + "version": "0.0.41", "main": "dist/node/index.js", "browser": "dist/web/index.js", "author": "bokuweb ",