fix autofmt: don't panic when writing blocks out without a srcfile (#2854)
* fix: don't panic when writing blocks out * also fix serialization for hotreload * fix windows line endings
This commit is contained in:
1 parent
b47a6cf83e
commit
4963aa3118
9 files changed
+142
-46
No files matched your search
@@ -93,7 +93,7 @@ pub fn try_fmt_file(
|
||||
writer.out.indent_level = writer
|
||||
.out
|
||||
.indent
|
||||
.count_indents(writer.src[rsx_start.line - 1]);
|
||||
.count_indents(writer.src.get(rsx_start.line - 1).unwrap_or(&""));
|
||||
|
||||
// TESTME
|
||||
// Writing *should* not fail but it's possible that it does
|
||||
|
||||
Reference in new issue
Block a user