Less restrictive strip_to_attr_name

This commit is contained in:
Bad Manners 2024-10-30 19:53:02 -03:00
parent 8d721fb430
commit 59c6688c6d

View file

@ -418,8 +418,8 @@ pub mod macro_private {
use alloc::string::String;
use core::fmt::Display;
pub fn strip_to_attr_name(input: &str, output: &mut String) {
for c in input.chars() {
pub fn strip_to_attr_name(input: impl Display, output: &mut String) {
for c in alloc::format!("{}", input).chars() {
match c {
' '
| '"'
@ -473,7 +473,7 @@ pub mod macro_private {
macro_rules! render_attr_name {
($x:expr, $buffer:expr) => {{
use $crate::macro_private::strip_to_attr_name;
strip_to_attr_name(($x), $buffer);
strip_to_attr_name($x, $buffer);
}};
}