fix: width reader (#135)
parent
30c514fe18
commit
902adfe0ad
|
@ -14,7 +14,7 @@ pub fn read_width(attrs: &[OwnedAttribute]) -> Result<(isize, WidthType), Reader
|
|||
if local_name == "type" {
|
||||
width_type = WidthType::from_str(&a.value)?;
|
||||
} else if local_name == "w" {
|
||||
w = isize::from_str(&a.value)?;
|
||||
w = f64::from_str(&a.value).expect("should read width.") as isize;
|
||||
}
|
||||
}
|
||||
Ok((w, width_type))
|
||||
|
|
Loading…
Reference in New Issue