diff --git a/src/rules/string.rs b/src/rules/string.rs index 44951ab..3e094ef 100644 --- a/src/rules/string.rs +++ b/src/rules/string.rs @@ -141,9 +141,11 @@ pub fn rule( )); if index + 1 != portions.len() { + steps.push_back(crate::builder::Step::Indent); steps.push_back(crate::builder::Step::FormatWider( interpolations.next().unwrap().clone(), )); + steps.push_back(crate::builder::Step::Dedent); } } } diff --git a/tests/cases/string/in b/tests/cases/string/in index 3f094e7..5d5fc8f 100644 --- a/tests/cases/string/in +++ b/tests/cases/string/in @@ -78,4 +78,14 @@ ${ expr "" v } '' + + '' + --${ + "test" + } + '' + + "--${ + "test" + }" ] diff --git a/tests/cases/string/out b/tests/cases/string/out index c858487..e1bfe23 100644 --- a/tests/cases/string/out +++ b/tests/cases/string/out @@ -78,4 +78,14 @@ ${expr "" v} '' + + '' + --${ + "test" + } + '' + + "--${ + "test" + }" ]