diff --git a/idea/src/org/jetbrains/kotlin/idea/formatter/JetBlock.java b/idea/src/org/jetbrains/kotlin/idea/formatter/JetBlock.java index 8fc01c09af8..cecfb43dacf 100644 --- a/idea/src/org/jetbrains/kotlin/idea/formatter/JetBlock.java +++ b/idea/src/org/jetbrains/kotlin/idea/formatter/JetBlock.java @@ -66,7 +66,9 @@ public class JetBlock extends AbstractBlock { CLASS_BODY, FUNCTION_LITERAL); - private static final TokenSet KDOC_CONTENT = TokenSet.create(KDocTokens.KDOC, KDocElementTypes.KDOC_SECTION); + private static final TokenSet KDOC_CONTENT = TokenSet.create(KDocTokens.KDOC, + KDocElementTypes.KDOC_SECTION, + KDocElementTypes.KDOC_TAG); // private static final List diff --git a/idea/testData/editor/commenter/newLineInTag.kt b/idea/testData/editor/commenter/newLineInTag.kt new file mode 100644 index 00000000000..f988cae2647 --- /dev/null +++ b/idea/testData/editor/commenter/newLineInTag.kt @@ -0,0 +1,3 @@ +/** + * @param foo + */ \ No newline at end of file diff --git a/idea/testData/editor/commenter/newLineInTag_after.kt b/idea/testData/editor/commenter/newLineInTag_after.kt new file mode 100644 index 00000000000..38387c97ad9 --- /dev/null +++ b/idea/testData/editor/commenter/newLineInTag_after.kt @@ -0,0 +1,4 @@ +/** + * @param foo + * + */ \ No newline at end of file diff --git a/idea/tests/org/jetbrains/kotlin/idea/editor/JetCommenterTest.java b/idea/tests/org/jetbrains/kotlin/idea/editor/JetCommenterTest.java index 24c7ef15661..7305be10698 100644 --- a/idea/tests/org/jetbrains/kotlin/idea/editor/JetCommenterTest.java +++ b/idea/tests/org/jetbrains/kotlin/idea/editor/JetCommenterTest.java @@ -35,6 +35,10 @@ public class JetCommenterTest extends LightCodeInsightTestCase { doNewLineTypingTest(); } + public void testNewLineInTag() throws Exception { + doNewLineTypingTest(); + } + private void doNewLineTypingTest() throws Exception { configure(); EditorTestUtil.performTypingAction(getEditor(), '\n');