From bcdb4366a55a25ddd1314cbf79ab27a8006c160c Mon Sep 17 00:00:00 2001 From: vmishenev Date: Fri, 24 Sep 2021 12:32:58 +0300 Subject: Fix whitespaces inside `@link` tag (#2156) --- .../base/src/main/kotlin/translators/psi/parsers/JavadocParser.kt | 4 ++-- plugins/base/src/test/kotlin/content/params/ContentForParamsTest.kt | 5 +++-- 2 files changed, 5 insertions(+), 4 deletions(-) (limited to 'plugins/base') diff --git a/plugins/base/src/main/kotlin/translators/psi/parsers/JavadocParser.kt b/plugins/base/src/main/kotlin/translators/psi/parsers/JavadocParser.kt index b7e60cee..ecf31541 100644 --- a/plugins/base/src/main/kotlin/translators/psi/parsers/JavadocParser.kt +++ b/plugins/base/src/main/kotlin/translators/psi/parsers/JavadocParser.kt @@ -332,8 +332,8 @@ class JavadocParser( ) = when (tag.name) { "link", "linkplain" -> tag.referenceElement() - ?.toDocumentationLinkString(tag.dataElements.filterIsInstance().joinToString("") { - it.stringifyElementAsText(keepFormatting = true).orEmpty() + ?.toDocumentationLinkString(tag.dataElements.filterIsInstance().joinToString(" ") { + it.stringifyElementAsText(keepFormatting = false).orEmpty() }) "code" -> "${dataElementsAsText(tag)}" "literal" -> "${dataElementsAsText(tag)}" diff --git a/plugins/base/src/test/kotlin/content/params/ContentForParamsTest.kt b/plugins/base/src/test/kotlin/content/params/ContentForParamsTest.kt index 1a6dd6de..75731665 100644 --- a/plugins/base/src/test/kotlin/content/params/ContentForParamsTest.kt +++ b/plugins/base/src/test/kotlin/content/params/ContentForParamsTest.kt @@ -262,9 +262,10 @@ class ContentForParamsTest : BaseAbstractTest() { | * @deprecated Instead of using a target fragment to pass results, the fragment requesting a | * result should use | * {@link java.util.HashMap#containsKey(java.lang.Object) FragmentManager#setFragmentResult(String, Bundle)} to deliver results to - | * {@link java.util.HashMap#containsKey(java.lang.Object) FragmentResultListener} instances registered by other fragments via + | * {@link java.util.HashMap#containsKey(java.lang.Object) + | * FragmentResultListener} instances registered by other fragments via | * {@link java.util.HashMap#containsKey(java.lang.Object) FragmentManager#setFragmentResultListener(String, LifecycleOwner, - | * FragmentResultListener)}. + | * FragmentResultListener)}. | */ | public class DocGenProcessor { | public String setTargetFragment(){ -- cgit