Fix for KT-14736 J2K Incorrect conversion of back ticks in javadoc {@code} tag
#KT-14736 fixed
This commit is contained in:
committed by
Simon Ogorodnik
parent
41aaaa6a0d
commit
347c6e100b
@@ -201,7 +201,13 @@ object IdeaDocCommentConverter : DocCommentConverter {
|
|||||||
|
|
||||||
"s", "del" -> MarkdownSpan.wrap("~~")
|
"s", "del" -> MarkdownSpan.wrap("~~")
|
||||||
|
|
||||||
"code" -> MarkdownSpan.wrap("`")
|
"code" -> {
|
||||||
|
val innerText = tag.value.text.trim()
|
||||||
|
if (innerText.startsWith('`') && innerText.endsWith('`'))
|
||||||
|
MarkdownSpan("`` ", " ``")
|
||||||
|
else
|
||||||
|
MarkdownSpan.wrap("`")
|
||||||
|
}
|
||||||
|
|
||||||
"a" -> {
|
"a" -> {
|
||||||
if (tag.getAttributeValue("docref") != null) {
|
if (tag.getAttributeValue("docref") != null) {
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
* Start.
|
* Start.
|
||||||
* Plain quote: 'quoted'
|
* Plain quote: 'quoted'
|
||||||
* KT-13818: {@code 'quoted'}
|
* KT-13818: {@code 'quoted'}
|
||||||
|
* KT-14736: {@code `code quoted`}
|
||||||
* Code: {@code someCode()}
|
* Code: {@code someCode()}
|
||||||
* Operators: {@code a > b}
|
* Operators: {@code a > b}
|
||||||
* String: {@code str = "String"}
|
* String: {@code str = "String"}
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
* Start.
|
* Start.
|
||||||
* Plain quote: 'quoted'
|
* Plain quote: 'quoted'
|
||||||
* KT-13818: `'quoted'`
|
* KT-13818: `'quoted'`
|
||||||
|
* KT-14736: `` `code quoted` ``
|
||||||
* Code: `someCode()`
|
* Code: `someCode()`
|
||||||
* Operators: `a > b`
|
* Operators: `a > b`
|
||||||
* String: `str = "String"`
|
* String: `str = "String"`
|
||||||
|
|||||||
Reference in New Issue
Block a user