mirror of
https://github.com/storytold/indd-utils.git
synced 2026-11-22 18:20:45 +01:00
style: format grouped_name
This commit is contained in:
1 parent
eacc1be120
commit
5fc388f409
1 file changed
+3
-4
+3
-4
@@ -98,10 +98,9 @@ impl Writer<'_> {
|
||||
/// `$ID/` first for a built-in style. Its `Self` is this name escaped
|
||||
/// with `self_name` (`docs/format/objects.md`, style groups).
|
||||
fn grouped_name(&self, uid: u32, name: &str, builtin: bool) -> String {
|
||||
let mut parts: Vec<String> = self
|
||||
.group_path
|
||||
.get(&uid)
|
||||
.map_or(Vec::new(), |p| p.iter().map(|g| g.replace(':', "\\:")).collect());
|
||||
let mut parts: Vec<String> = self.group_path.get(&uid).map_or(Vec::new(), |p| {
|
||||
p.iter().map(|g| g.replace(':', "\\:")).collect()
|
||||
});
|
||||
parts.push(name.replace(':', "\\:"));
|
||||
let joined = parts.join(":");
|
||||
if builtin {
|
||||
|
||||
Reference in new issue
Block a user