diff options
Diffstat (limited to 'mingling_macros/src/node.rs')
| -rw-r--r-- | mingling_macros/src/node.rs | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/mingling_macros/src/node.rs b/mingling_macros/src/node.rs index 8cb88d3..be47374 100644 --- a/mingling_macros/src/node.rs +++ b/mingling_macros/src/node.rs @@ -39,7 +39,13 @@ pub fn node(input: TokenStream) -> TokenStream { // Split the path by dots let parts: Vec<String> = path_str .split('.') - .map(|s| kebab_case!(s).to_string()) + .map(|s| { + if s.starts_with('_') { + s.to_string() + } else { + kebab_case!(s).to_string() + } + }) .collect(); // Build the expression starting from Node::default() |
