Minify area[shape] attr; simplify NS code

This commit is contained in:
Wilson 2020-01-24 15:17:46 +13:00
parent 54b65bbd0c
commit 6ec509945a
2 changed files with 5 additions and 1 deletions

View File

@ -94,6 +94,10 @@ const defaultAttributeValues = {
tags: ['html:table'],
defaultValue: 'none',
}],
'shape': [{
tags: ['html:area'],
defaultValue: 'rect',
}],
'span': [{
tags: ['html:col', 'html:colgroup'],
defaultValue: '1',

View File

@ -194,7 +194,7 @@ pub fn process_tag(proc: &mut Processor, ns: Namespace, mut prev_sibling_closing
return Ok(MaybeClosingTag(None));
};
let child_ns = if ns != Namespace::Svg && proc[tag_name].eq(b"svg") {
let child_ns = if proc[tag_name].eq(b"svg") {
Namespace::Svg
} else {
ns