File tree 2 files changed +6
-5
lines changed
2 files changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -148,7 +148,7 @@ impl Config {
148
148
149
149
if !syntaxes. contains_key ( default_syntax) {
150
150
return Err ( CompileError :: new (
151
- format ! ( "default syntax \" {default_syntax}\" not found" ) ,
151
+ format_args ! ( "default syntax \" {default_syntax}\" not found" ) ,
152
152
file_info,
153
153
) ) ;
154
154
}
@@ -342,13 +342,13 @@ pub(crate) fn read_config_file(
342
342
if filename. exists ( ) {
343
343
fs:: read_to_string ( & filename) . map_err ( |err| {
344
344
CompileError :: no_file_info (
345
- format ! ( "unable to read {}: {err}" , filename. display( ) ) ,
345
+ format_args ! ( "unable to read {}: {err}" , filename. display( ) ) ,
346
346
span,
347
347
)
348
348
} )
349
349
} else if config_path. is_some ( ) {
350
350
Err ( CompileError :: no_file_info (
351
- format ! ( "`{}` does not exist" , filename. display( ) ) ,
351
+ format_args ! ( "`{}` does not exist" , filename. display( ) ) ,
352
352
span,
353
353
) )
354
354
} else {
Original file line number Diff line number Diff line change @@ -754,8 +754,9 @@ impl State<'_, '_> {
754
754
. parse_next ( i) ?;
755
755
if let Some ( control) = control {
756
756
let message = format ! (
757
- "unclosed block, you likely meant to apply whitespace control: {:?}" ,
758
- format!( "{control}{}" , self . syntax. block_end) ,
757
+ "unclosed block, you likely meant to apply whitespace control: \" {}{}\" " ,
758
+ control. escape_default( ) ,
759
+ self . syntax. block_end. escape_default( ) ,
759
760
) ;
760
761
Err ( ParseErr :: backtrack ( ErrorContext :: new ( message, * i) . into ( ) ) )
761
762
} else {
You can’t perform that action at this time.
0 commit comments