pub fn data_attribute(field: &str) -> StringExpand description
Returns the attribute name a payload field is written under: DATA_PREFIX
followed by field with every _ and . turned into -.
§Examples
use flm_core::stdlib::backends::html::names::data_attribute;
assert_eq!(data_attribute("level"), "data-flm-level");
assert_eq!(data_attribute("source_span"), "data-flm-source-span");