Is there anyway to leave a "link" to another class...
# random
c
Is there anyway to leave a "link" to another class in a comment? e.g. I want to have a comment of
Copy code
//If you are touching this class, you will also have to update #LINK_TO_OTHER_CLASS
and hopefully I'd like to make the link "clickable" of course.
s
If it’s a kdoc comment, then yes Kdoc comments start with
/**
and end with
*/
☝️ 1
Inside a kdoc comment you can make links using square brackets
e.g.
Copy code
/**
 * If you are touching this class, you will also 
 * have to update [com.example.MyOtherClass]
 */
m
Yes exactly! Also, if such class is already imported in the file you can omit the package like
[MyOtherClass]
c
AH. Heck yes. THANKS
interesting. only able to link a single class. if i try another i just get no highlighting.
🤔 1
oh. actually just seems to be a formatting thing. if a get rid of some spaces at the beginging of the line, then its fine with it.
👍 1
e
it's markdown
4 leading spaces makes a code block
👍 1
t
interesting. only able to link a single class. if i try another i just get no highlighting.
@Colton Idle I think we have to
import
the class to use it in
kdoc
🤔 ?