Fix for KT-14736 J2K Incorrect conversion of back ticks in javadoc {@code} tag

#KT-14736 fixed
This commit is contained in:
Simon Ogorodnik
2016-12-18 19:06:28 +03:00
committed by Simon Ogorodnik
parent 41aaaa6a0d
commit 347c6e100b
3 changed files with 9 additions and 1 deletions
@@ -201,7 +201,13 @@ object IdeaDocCommentConverter : DocCommentConverter {
"s", "del" -> MarkdownSpan.wrap("~~")
"code" -> MarkdownSpan.wrap("`")
"code" -> {
val innerText = tag.value.text.trim()
if (innerText.startsWith('`') && innerText.endsWith('`'))
MarkdownSpan("`` ", " ``")
else
MarkdownSpan.wrap("`")
}
"a" -> {
if (tag.getAttributeValue("docref") != null) {