♻️ (util): Extrae non_blank() y normalize_token()
This commit is contained in:
parent
747e64ce34
commit
dc2ed27da4
8 changed files with 71 additions and 37 deletions
|
|
@ -734,12 +734,7 @@ impl Props {
|
|||
// **< Props PRIVATE >**************************************************************************
|
||||
|
||||
fn apply_id(&mut self, id: &str) {
|
||||
let id = id.trim();
|
||||
self.id = if id.is_empty() {
|
||||
None
|
||||
} else {
|
||||
Some(id.to_ascii_lowercase().replace(' ', "_"))
|
||||
};
|
||||
self.id = util::normalize_token(id);
|
||||
}
|
||||
|
||||
fn insert_classes<'a, I>(&mut self, classes: I, mut pos: usize)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue