Parse raw elements, attributes, and web components in rsx (#2655)

* parse raw elements and attributes in rsx

---------

Co-authored-by: Jonathan Kelley <jkelleyrtp@gmail.com>
This commit is contained in:
Evan AlmloffandJonathan Kelley authored and GitHub committed 2024-07-23 16:48:40 -07:00
1 parent fa4e5dbf62
commit 3bb9a535d8
6 files changed
+42 -9

No files matched your search

+2 -2
View File
@@ -116,7 +116,7 @@ impl RsxBlock {
}
// Parse unambiguous attributes - these can't be confused with anything
if (content.peek(LitStr) || content.peek(Ident) || content.peek(Ident::peek_any))
if (content.peek(LitStr) || content.peek(Ident::peek_any))
&& content.peek2(Token![:])
&& !content.peek3(Token![:])
{
@@ -239,7 +239,7 @@ impl RsxBlock {
}
fn peek_lowercase_ident(stream: &ParseStream) -> bool {
let Ok(ident) = stream.fork().parse::<Ident>() else {
let Ok(ident) = stream.fork().call(Ident::parse_any) else {
return false;
};