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) {
+1
View File
@@ -2,6 +2,7 @@
* Start.
* Plain quote: 'quoted'
* KT-13818: {@code 'quoted'}
* KT-14736: {@code `code quoted`}
* Code: {@code someCode()}
* Operators: {@code a > b}
* String: {@code str = "String"}
+1
View File
@@ -2,6 +2,7 @@
* Start.
* Plain quote: 'quoted'
* KT-13818: `'quoted'`
* KT-14736: `` `code quoted` ``
* Code: `someCode()`
* Operators: `a > b`
* String: `str = "String"`