mirror of
https://github.com/DioxusLabs/dioxus
synced 2024-11-27 06:30:20 +00:00
chore: add todo list to autofmt crate
This commit is contained in:
parent
2634755620
commit
64d669e934
4 changed files with 24 additions and 1 deletions
|
@ -3,3 +3,15 @@
|
|||
This crate formats rsx! by parsing call bodies and pretty-printing them back out.
|
||||
|
||||
|
||||
|
||||
# Todo:
|
||||
Sorted roughly in order of what's possible
|
||||
|
||||
- [ ] Oneline rsx! calls - blocker because this wrecks formatting
|
||||
- [ ] Nested RSX calls (important) - unnecessary but desirable
|
||||
- [ ] RSX edits overstepping each other
|
||||
- [ ] Collapse components and elements under syntax -
|
||||
- [ ] Don't eat comments in exprs
|
||||
- [ ] Format regular exprs
|
||||
- [ ] Fix prettyplease around chaining
|
||||
- [ ] Don't eat comments in prettyplease
|
||||
|
|
|
@ -2,7 +2,6 @@ use crate::Buffer;
|
|||
use dioxus_rsx::*;
|
||||
use proc_macro2::Span;
|
||||
use std::{fmt::Result, fmt::Write};
|
||||
use syn::spanned::Spanned;
|
||||
|
||||
#[derive(Debug)]
|
||||
enum ShortOptimization {
|
||||
|
|
|
@ -40,3 +40,14 @@ fn comment_attr_case_work() {
|
|||
|
||||
println!("{}", out);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn tiny() {
|
||||
// todo: get oneliner rsx working
|
||||
let _src = include_str!("./samples/tiny.rsx");
|
||||
|
||||
// let formatted = dioxus_autofmt::fmt_file(src);
|
||||
// let out = dioxus_autofmt::apply_formats(src, formatted);
|
||||
|
||||
// println!("{}", out);
|
||||
}
|
||||
|
|
1
packages/autofmt/tests/samples/tiny.rsx
Normal file
1
packages/autofmt/tests/samples/tiny.rsx
Normal file
|
@ -0,0 +1 @@
|
|||
rsx! { div {} }
|
Loading…
Reference in a new issue