mirror of
https://github.com/servo/servo.git
synced 2025-09-30 16:49:16 +01:00
Auto merge of #5503 - nox:cleanup-attributes, r=Manishearth
This makes all tests in attributes.html pass.
This commit is contained in:
commit
8d1a6c45f6
18 changed files with 138 additions and 156 deletions
|
@ -653,7 +653,7 @@ pub fn xml_name_type(name: &str) -> XMLName {
|
|||
let mut iter = name.chars();
|
||||
let mut non_qname_colons = false;
|
||||
let mut seen_colon = false;
|
||||
match iter.next() {
|
||||
let mut last = match iter.next() {
|
||||
None => return XMLName::InvalidXMLName,
|
||||
Some(c) => {
|
||||
if !is_valid_start(c) {
|
||||
|
@ -662,10 +662,11 @@ pub fn xml_name_type(name: &str) -> XMLName {
|
|||
if c == ':' {
|
||||
non_qname_colons = true;
|
||||
}
|
||||
c
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
for c in name.chars() {
|
||||
for c in iter {
|
||||
if !is_valid_continuation(c) {
|
||||
return XMLName::InvalidXMLName;
|
||||
}
|
||||
|
@ -675,6 +676,11 @@ pub fn xml_name_type(name: &str) -> XMLName {
|
|||
false => seen_colon = true
|
||||
}
|
||||
}
|
||||
last = c
|
||||
}
|
||||
|
||||
if last == ':' {
|
||||
non_qname_colons = true
|
||||
}
|
||||
|
||||
match non_qname_colons {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue