Skip to main content

parse_html_attribute_list

Function parse_html_attribute_list 

Source
pub fn parse_html_attribute_list(attrs_text: &str) -> Option<AttributeBlock>
Expand description

Parse a raw HTML attribute list (the bytes between a tag name and the closing >, exclusive). Accepts inputs like id="x" class="a b" data-key=v and produces an AttributeBlock. Returns None if no recognized attributes are present.

Used by parse_html_tag_attributes (which strips <TAG ...> surrounding chrome before delegating here) and by AttributeNode::id for the structural HTML_ATTRS CST node, whose text holds JUST the attribute region.