mirror of
https://github.com/DioxusLabs/dioxus
synced 2024-11-23 12:43:08 +00:00
chore: dont panic
This commit is contained in:
parent
ecb154db6f
commit
5c63ae4b5d
2 changed files with 1 additions and 12 deletions
|
@ -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 {
|
||||
|
|
Loading…
Reference in a new issue