fix: some edge cases around autoformatting (#485)

* wip: remove comment support from autofmt

* fix: some edge cases around autoformatting

* fix: revert readme

* fix: failing test
This commit is contained in:
Jon Kelley authored and GitHub committed 2022-07-04 21:11:03 -04:00
1 parent 3a5d1a2ff8
commit 3a30b36f68
11 files changed
+536 -141

No files matched your search

+22
View File
@@ -0,0 +1,22 @@
#[test]
fn formats_file_properly() {
let src = include_str!("./samples/thing.rsx");
let formatted = dioxus_autofmt::fmt_file(src);
let out = dioxus_autofmt::apply_formats(src, formatted);
println!("{}", out);
}
#[test]
fn already_formatted_file_properly() {
let src = include_str!("./samples/pre.rsx");
let formatted = dioxus_autofmt::fmt_file(src);
dbg!(&formatted);
let out = dioxus_autofmt::apply_formats(src, formatted);
println!("{}", out);
}