Skip to content

Commit

Permalink
fix "as" html attributes not being rendered
Browse files Browse the repository at this point in the history
  • Loading branch information
Pitasi committed Sep 9, 2023
1 parent 6221db1 commit fd360bb
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion rscx-macros/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,11 @@ fn walk_nodes<'a>(empty_elements: &HashSet<&str>, nodes: &'a Vec<Node>) -> WalkN
out.values.push(block.to_token_stream());
}
NodeAttribute::Attribute(attribute) => {
out.static_format.push_str(&format!(" {}", attribute.key));
let key = match attribute.key.to_string().as_str() {
"as_" => "as".to_string(),
_ => attribute.key.to_string(),
};
out.static_format.push_str(&format!(" {}", key));
if let Some(value) = attribute.value() {
out.static_format.push_str(r#"="{}""#);
out.values.push(value.to_token_stream());
Expand Down

0 comments on commit fd360bb

Please sign in to comment.