mirror of
https://github.com/DioxusLabs/dioxus
synced 2024-11-10 06:34:20 +00:00
fix: element start with lowercase letter again :D
This commit is contained in:
parent
062f986841
commit
03a14f4a86
1 changed files with 7 additions and 2 deletions
|
@ -33,13 +33,18 @@ impl Parse for BodyNode {
|
|||
// this is an Element if path match of:
|
||||
// - one ident
|
||||
// - followed by `{`
|
||||
// - all chars lowercase
|
||||
// - 1st char is lowercase
|
||||
//
|
||||
// example:
|
||||
// div {}
|
||||
if let Some(ident) = path.get_ident() {
|
||||
if body_stream.peek(token::Brace)
|
||||
&& ident.to_string().chars().all(char::is_lowercase)
|
||||
&& ident
|
||||
.to_string()
|
||||
.chars()
|
||||
.next()
|
||||
.unwrap()
|
||||
.is_ascii_lowercase()
|
||||
{
|
||||
return Ok(BodyNode::Element(stream.parse::<Element>()?));
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue