diff --git a/HTMLKit/HTMLParser.m b/HTMLKit/HTMLParser.m index 539ce36..d561e59 100644 --- a/HTMLKit/HTMLParser.m +++ b/HTMLKit/HTMLParser.m @@ -421,8 +421,8 @@ - (HTMLElement *)createElementForToken:(HTMLTagToken *)token inNamespace:(HTMLNamespace)htmlNamespace { HTMLElement *element = [[HTMLElement alloc] initWithTagName:token.tagName - attributes:token.attributes - namespace:htmlNamespace]; + namespace:htmlNamespace + attributes:token.attributes]; return element; } diff --git a/HTMLKitTests/HTML5LibTreeConstructionTest.m b/HTMLKitTests/HTML5LibTreeConstructionTest.m index 1e8ac4d..37bea03 100644 --- a/HTMLKitTests/HTML5LibTreeConstructionTest.m +++ b/HTMLKitTests/HTML5LibTreeConstructionTest.m @@ -111,7 +111,7 @@ static NSString * const TreeConstruction = @"tree-construction"; fragment = [fragment substringFromIndex:@"svg ".length]; namespace = HTMLNamespaceSVG; } - test.documentFragment = [[HTMLElement alloc] initWithTagName:fragment attributes:nil namespace:namespace]; + test.documentFragment = [[HTMLElement alloc] initWithTagName:fragment namespace:namespace attributes:nil]; } else if ([match hasPrefix:@"#document\n"]) { NSArray *parts = [[match substringFromIndex:@"#document\n".length] componentsSeparatedByString:@"| "]; NSArray *nodes = [HTML5LibTreeConstructionTest parseDocument:parts]; @@ -245,7 +245,7 @@ NS_INLINE HTMLElement * parseTag(NSString *str) NSString *tagName = parts.count == 2 ? parts[1] : parts[0]; HTMLNamespace namespace = parts.count == 1 ? HTMLNamespaceHTML : ([parts[0] isEqualToString:@"math"] ? HTMLNamespaceMathML : HTMLNamespaceSVG); - HTMLElement *element = [[HTMLElement alloc] initWithTagName:tagName attributes:nil namespace:namespace]; + HTMLElement *element = [[HTMLElement alloc] initWithTagName:tagName namespace:namespace attributes:nil]; return element; }