Assuming we have such documented string
/** retrieve a state of the service * <br/> HTTP code 200 - normal state * <br/> HTTP code 403 - some recoverable state: const val SERVICE_STATE = "servicestate" */
There are several <br/>
here, which i used to break a line, like i do in java, but output of AndroidStudio (seems same in InteliJIdea) is
with java it is parsed & displayed correctly:
/** retrieve a state of the service * <br/> HTTP code 200 - normal state * <br/> HTTP code 403 - some recoverable state */ public static final String SERVICE_STATE = "servicestate";
Can i somehow achieve the same with kotlin & IntelijIdea, maybe kotlin has another option to break the line in KDoc?
noun. : the last line of a paragraph especially when not of full length when printed.
Updated: 07/31/2022 by Computer Hope. A line break is a command or sequence of control characters that returns the cursor to the next line and does not create a new paragraph. Essentially, line breaks denote the end of one line and the start of a new one.
The language used to document Kotlin code (the equivalent of Java's Javadoc) is called KDoc. In its essence, KDoc combines Javadoc's syntax for block tags (extended to support Kotlin's specific constructs) and Markdown for inline markup.
Documenting Modules and Packages KDoc also supports documenting a package or a module using a custom markdown file. Open module.md in the app module. Replace the contents of the file (the TODO:4 line) with the following: # Module notktx-app ## Description This adds a custom module-level description for the app module.
The KDoc format uses Markdown syntax instead of HTML, and basic Markdown does not provide a way to break the line without starting a new paragraph.
I'm not sure why the Kotlin IntellIJ plugin does not support <br/>
or the double space hack.
If starting a new paragraph is OK, just skip an empty line:
/** * retrieve a state of the service * * HTTP code 200 - normal state * * HTTP code 403 - some recoverable state: */
The result is:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With