You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe
I try to always add an example of usage to each function. However, they appear as static text to users, so I have to add links to around the sample to link to methods called in the sample.
Dokka supports "enhanced code blocks" (I don't know how you call them). Typically, one of them is visible in the main section of each page, just below the main title. These blocks are generated by Dokka from source code (not from comments in source code) and can contain links to other functions.
Here is an example in the Prepared documentation:
As shown in the capture, symbols referred to in the enhanced code block can be clicked, whereas symbols referred to in regular code blocks cannot.
Describe the solution you'd like
This proposal would be to enable this feature in some Markdown code blocks. The exact restrictions are to be discussed, but a basic list could be:
• Has to be declared with the language kotlin
• Has to compile if put in a .kts environment declared in the same package as the current declaration, using the same imports as present in the current file
Describe alternatives you've considered
N/A
Additional context
Originally requested as a feature of Kotools Samples: kotools/samples#14. The end goal for me is the ability to ensure samples are correct (provided by Kotools Samples) as well as provide navigation in them (this feature).
The text was updated successfully, but these errors were encountered:
Is your feature request related to a problem? Please describe
I try to always add an example of usage to each function. However, they appear as static text to users, so I have to add links to around the sample to link to methods called in the sample.
Dokka supports "enhanced code blocks" (I don't know how you call them). Typically, one of them is visible in the
main
section of each page, just below the main title. These blocks are generated by Dokka from source code (not from comments in source code) and can contain links to other functions.Here is an example in the Prepared documentation:
As shown in the capture, symbols referred to in the enhanced code block can be clicked, whereas symbols referred to in regular code blocks cannot.
Describe the solution you'd like
This proposal would be to enable this feature in some Markdown code blocks. The exact restrictions are to be discussed, but a basic list could be:
• Has to be declared with the language
kotlin
• Has to compile if put in a .kts environment declared in the same package as the current declaration, using the same imports as present in the current file
Describe alternatives you've considered
N/A
Additional context
Originally requested as a feature of Kotools Samples: kotools/samples#14. The end goal for me is the ability to ensure samples are correct (provided by Kotools Samples) as well as provide navigation in them (this feature).
The text was updated successfully, but these errors were encountered: