chore: dont panic
This commit is contained in:
1 parent
ecb154db6f
commit
5c63ae4b5d
2 files changed
+1
-12
No files matched your search
@@ -118,7 +118,7 @@ pub fn write_block_out(body: CallBody) -> Option<String> {
|
||||
}
|
||||
|
||||
pub fn fmt_block(block: &str, indent_level: usize) -> Option<String> {
|
||||
let body = syn::parse_str::<dioxus_rsx::CallBody>(block).unwrap();
|
||||
let body = syn::parse_str::<dioxus_rsx::CallBody>(block).ok()?;
|
||||
|
||||
let mut buf = Buffer {
|
||||
src: block.lines().map(|f| f.to_string()).collect(),
|
||||
|
||||
@@ -16,17 +16,6 @@ Parse
|
||||
-> component()
|
||||
-> "text {with_args}"
|
||||
-> (0..10).map(|f| rsx!("asd")), // <--- notice the comma - must be a complete expr
|
||||
-> // some comment here (no support for slash asterisk comments - those get deleted completely)
|
||||
|
||||
|
||||
|
||||
div {
|
||||
// Comment
|
||||
div { // a comment here because it shares the line
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
*/
|
||||
#[derive(PartialEq, Eq, Clone, Debug, Hash)]
|
||||
pub enum BodyNode {
|
||||
|
||||
Reference in new issue
Block a user