fix autoformatting raw strings

This commit is contained in:
Evan Almloff committed 2023-06-02 12:03:56 -05:00
1 parent 563a2b0953
commit d9e0b9a918
9 files changed
+89 -48

No files matched your search

+22 -18
View File
@@ -4,8 +4,8 @@ macro_rules! twoway {
// doc attrs
$( #[doc = $doc:expr] )*
$name:ident
),*
$name:ident,
)*
) => {
$(
$( #[doc = $doc] )*
@@ -14,6 +14,9 @@ macro_rules! twoway {
let src = include_str!(concat!("./samples/", stringify!($name), ".rsx"));
let formatted = dioxus_autofmt::fmt_file(src);
let out = dioxus_autofmt::apply_formats(src, formatted);
// normalize line endings
let out = out.replace("\r", "");
let src = src.replace("\r", "");
pretty_assertions::assert_eq!(&src, &out);
}
)*
@@ -21,24 +24,25 @@ macro_rules! twoway {
}
twoway![
simple,
comments,
attributes,
manual_props,
collapse_expr,
comments,
commentshard,
complex,
emoji,
ifchain_forloop,
immediate_expr,
key,
long_exprs,
long,
manual_props,
messy_indent,
multirsx,
raw_strings,
reallylong,
simple,
t2,
tiny,
tinynoopt,
long,
key,
multirsx,
commentshard,
emoji,
messy_indent,
long_exprs,
ifchain_forloop,
t2,
reallylong,
immediate_expr,
collapse_expr,
trailing_expr
trailing_expr,
];