File tree Expand file tree Collapse file tree 1 file changed +36
-0
lines changed Expand file tree Collapse file tree 1 file changed +36
-0
lines changed Original file line number Diff line number Diff line change @@ -1290,3 +1290,39 @@ And another line not indented
1290
1290
\" )
1291
1291
}
1292
1292
" ))
1293
+
1294
+ (ert-deftest test-indent-string-eol-backslash-dont-touch-raw-strings ()
1295
+ (test-indent
1296
+ "
1297
+ pub fn foo() {
1298
+ format!(r\" \
1299
+ abc\
1300
+ def\" );
1301
+ }
1302
+
1303
+ pub fn foo() {
1304
+ format!(r\" la la la
1305
+ la\
1306
+ la la\" );
1307
+ }
1308
+ "
1309
+ ; ; Should still indent the code parts but leave the string internals alone:
1310
+ "
1311
+ pub fn foo() {
1312
+ format!(r\" \
1313
+ abc\
1314
+ def\" );
1315
+ }
1316
+
1317
+ pub fn foo() {
1318
+ format!(r\" la la la
1319
+ la\
1320
+ la la\" );
1321
+ }
1322
+ "
1323
+ ))
1324
+
1325
+ (ert-deftest indent-inside-string-first-line ()
1326
+ (test-indent
1327
+ ; ; Needs to leave 1 space before "world"
1328
+ " \" hello \\ \n world\" " ))
You can’t perform that action at this time.
0 commit comments