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
Enum members are listed in backwards order. #2466
Labels
Comments
IgnatBeresnev
added
the
format: gfm
An issue/PR related to Dokka's GFM output format
label
Apr 25, 2022
cosinekitty
added a commit
to cosinekitty/astronomy
that referenced
this issue
Apr 25, 2022
I reported an issue to Dokka about enum members being listed backwards in the generated markdown: Kotlin/dokka#2466 In the meantime, this is a workaround where I reverse the order of the enum members in my own script format_kotlin_doc.py.
IgnatBeresnev
removed
the
format: gfm
An issue/PR related to Dokka's GFM output format
label
Apr 25, 2022
Thanks for the report! I've checked and it's relevant for |
IgnatBeresnev
added a commit
that referenced
this issue
Apr 25, 2022
IgnatBeresnev
added a commit
that referenced
this issue
Apr 26, 2022
* Fix reversed ordering of enum entries Fixes #2466 * Add navigation sideMenu unit tests * Make enum entries in tests non alphabetical
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug
I have a Kotlin project that includes several enum classes. There is a single source file
astronomy.kt
that contains all the code and documentation comments. I am using Dokka to generate "GitHub Flavored Markdown" (gfm). When Dokka encounters an enum declaration like this...... it generates markdown with the members listed in reverse order:
Expected behaviour
The enum members should be documented in the same order they appear in the source code. I chose the above example because it is relatively simple, but there are other cases where the order is more problematic. For example, I have an enumerated type for solar system bodies, and the planets are listed backwards, which is confusing for people using my project. Issue #47 might possibly be related?
Screenshots
N/A
To Reproduce
git checkout kotlin
cd source/kotlin
./gradlew dokkaGfm
source/kotlin/build/dokka/gfm/astronomy/io.github.cosinekitty.astronomy/-refraction/index.md
. It will list the enum values in the order JplHor, Normal, None. The correct order is None, Normal, JplHor.Dokka configuration
Configuration of dokka used to reproduce the bug:
Installation
Additional context
Are you willing to provide a PR?
I am happy to provide whatever help the maintainers could use to reproduce/diagnose this bug. Thank you!
The text was updated successfully, but these errors were encountered: