@@ -1377,7 +1377,7 @@ where
13771377 self . insert_element ( Push , ns ! ( html) , name, vec ! [ ] )
13781378 }
13791379
1380- // https://html.spec.whatwg.org/multipage/parsing.html#insert-an-element-at-the-adjusted-insertion-location
1380+ /// < https://html.spec.whatwg.org/multipage/parsing.html#insert-an-element-at-the-adjusted-insertion-location>
13811381 fn insert_foreign_element (
13821382 & self ,
13831383 tag : Tag ,
@@ -1398,8 +1398,9 @@ where
13981398 }
13991399 //§ END
14001400
1401- // https://html.spec.whatwg.org/multipage/parsing.html#parsing-main-inhead
1402- // A start tag whose tag name is "template"
1401+ /// <https://html.spec.whatwg.org/multipage/parsing.html#parsing-main-inhead>
1402+ ///
1403+ /// A start tag whose tag name is "template"
14031404 fn should_attach_declarative_shadow ( & self , tag : & Tag ) -> bool {
14041405 let adjusted_insertion_location = self . appropriate_place_for_insertion ( None ) ;
14051406
@@ -1414,7 +1415,7 @@ where
14141415 // template start tag's shadowrootmode is not in the none state
14151416 let is_shadow_root_mode = tag. attrs . iter ( ) . any ( |attr| {
14161417 attr. name . local == local_name ! ( "shadowrootmode" )
1417- && ( attr. value . to_string ( ) == * "open" || attr. value . to_string ( ) == * "closed" )
1418+ && ( attr. value . as_ref ( ) == "open" || attr. value . as_ref ( ) == "closed" )
14181419 } ) ;
14191420
14201421 // Check if intended_parent's document allows declarative shadow roots
@@ -1438,8 +1439,9 @@ where
14381439 is_shadow_root_mode && allow_declarative_shadow_roots && adjusted_current_node_not_topmost
14391440 }
14401441
1441- // https://html.spec.whatwg.org/multipage/parsing.html#parsing-main-inhead
1442- // A start tag whose tag name is "template"
1442+ /// <https://html.spec.whatwg.org/multipage/parsing.html#parsing-main-inhead>
1443+ ///
1444+ /// A start tag whose tag name is "template"
14431445 fn attach_declarative_shadow (
14441446 & self ,
14451447 tag : & Tag ,
0 commit comments