mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
[formatter] allow empty blocks IDEA-162000
This commit is contained in:
@@ -343,7 +343,6 @@ public class InitialInfoBuilder {
|
||||
checkInsideFormatterOffTag(rootBlock);
|
||||
|
||||
TextRange textRange = rootBlock.getTextRange();
|
||||
checkRange(textRange);
|
||||
|
||||
if (myPreviousBlock != null) {
|
||||
myPreviousBlock.setNextBlock(info);
|
||||
|
||||
+16
-2
@@ -32,16 +32,30 @@ class FormatterEngineTests : LightPlatformTestCase() {
|
||||
@Test
|
||||
fun `test simple alignment`() {
|
||||
doTest(
|
||||
"""
|
||||
"""
|
||||
[a0]fooooo [a1]foo
|
||||
[a0]go [a1]boo
|
||||
""",
|
||||
"""
|
||||
"""
|
||||
fooooo foo
|
||||
go boo
|
||||
""")
|
||||
}
|
||||
|
||||
@Test
|
||||
fun `test empty block alignment`() {
|
||||
doTest(
|
||||
"""
|
||||
[a0]fooooo [a1]
|
||||
[a0]go [a1]boo
|
||||
""",
|
||||
"""
|
||||
fooooo
|
||||
go boo
|
||||
""")
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
fun doTest(before: String, expectedText: String) {
|
||||
|
||||
Reference in New Issue
Block a user