New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Gfm adding consecutive ~~ for deprecated code #2177
Comments
I wouldn't mind trying to help fix this. I've gone through the code a bit; is there a test that can be created that takes raw Kotlin and can output the HTML and/or markdown as a String? https://github.com/Kotlin/dokka/blob/master/plugins/gfm/src/test/kotlin/renderers/gfm/SimpleElementsTest.kt#L73 only covers how it renders, not how it parses. |
Yes, e.g. there is https://github.com/Kotlin/dokka/blob/master/plugins/base/src/test/kotlin/signatures/SignatureTest.kt |
Thanks. I created and pushed a test, keeping an incorrect expected: https://github.com/stevenzeck/dokka/blob/gfm-deprecated-fix/plugins/gfm/src/test/kotlin/renderers/gfm/ParseRenderTest.kt. I'm still thinking of the best way to fix this, preferably keeping it limited to the CommonmarkRenderer. It is complicated by the fact that GitHub doesn't strikethrough special characters in the middle of text. e.g. Int~~(~~ doesn't work, while |
#2622 Now we have strikethrough only for declaration names and not for the whole signature as before. |
Describe the bug
When running Gfm against code marked with
@Deprecated
, it adds consecutive~~
in certain cases. Take this example:This produces a test.md file (among other md files) with the following contents:
Expected behaviour
I think ideally there would only be
~~
at the beginning and end of this entire line:fun test(var3: Int)
. It looks like however it is being parsed, it is passing in each of these when being sent to buildText, so each is surrounded with ~~:Screenshots
N/A
To Reproduce
You can use that data class example above and generate Gfm docs from it.
Dokka configuration
Configuration of dokka used to reproduce the bug
Installation
Additional context
N/A
Are you willing to provide a PR?
I can try if someone points me in the right direction. I've tried setting this up locally to debug against an Android project, but couldn't do anything other than get it to log.
The text was updated successfully, but these errors were encountered: