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) { match name.prefix.as_ref().map(std::ops::Deref::deref) {
Some("w") => { Some("w") => {
let e = XMLElement::from_str(&name.local_name).unwrap(); let e = XMLElement::from_str(&name.local_name).unwrap();
ignore::ignore_element(e.clone(), XMLElement::RunPropertyChange, r);
match e { match e {
XMLElement::Tab => { XMLElement::Tab => {
run = run.add_tab(); run = run.add_tab();

View File

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