render_class_attribute

func render_class_attribute(value: String) -> String

Wraps a macro-generated class list in a leading-space class attribute.

value is expected to contain trusted class-name text assembled by append_html_class; this helper does not perform HTML escaping.

View Source
pub func render_class_attribute(value: String) -> String {
	if value.byte_count == 0 { "" } else { " class=\"" + value + "\"" }
}