Fix missing space at end of self-closing SVG tags when last attribute is unquoted

This commit is contained in:
Wilson Lin 2020-07-04 15:58:35 +10:00
parent 7c2c898d36
commit 38084e2894
1 changed files with 4 additions and 0 deletions

View File

@ -191,6 +191,10 @@ pub fn process_tag(proc: &mut Processor, ns: Namespace, mut prev_sibling_closing
if is_void_tag {
proc.write_slice(b">");
} else {
if let Some(AttrType::Unquoted) = last_attr_type {
// Prevent `/` from being part of the value.
proc.write(b' ');
};
proc.write_slice(b"/>");
};
};