fix: ignore rPrChange (#89)

main
bokuweb 2020-07-09 13:25:01 +09:00 committed by GitHub
parent 4bce99003f
commit 4a4a1397f9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 0 deletions

View File

@ -34,6 +34,9 @@ impl ElementReader for Run {
match name.prefix.as_ref().map(std::ops::Deref::deref) {
Some("w") => {
let e = XMLElement::from_str(&name.local_name).unwrap();
ignore::ignore_element(e.clone(), XMLElement::RunPropertyChange, r);
match e {
XMLElement::Tab => {
run = run.add_tab();

View File

@ -27,6 +27,7 @@ pub enum XMLElement {
Tab,
ParagraphStyle,
ParagraphPropertyChange,
RunPropertyChange,
Indent,
Name,
Alignment,
@ -158,6 +159,7 @@ impl FromStr for XMLElement {
"p" => Ok(XMLElement::Paragraph),
"r" => Ok(XMLElement::Run),
"rPr" => Ok(XMLElement::RunProperty),
"rPrChange" => Ok(XMLElement::RunPropertyChange),
"color" => Ok(XMLElement::Color),
"t" => Ok(XMLElement::Text),
"sz" => Ok(XMLElement::Size),