Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

296
Views
How to escape symbols in Kotlin documentation Dokka/Kdoc?

I want to add a comment like this

  /**
   * @param scrollFraction In range [0..1].
   */

But Dokka/Kdoc interprets stuff inside square brackets as a reference. This leads to badly rendered comments when you check the function's documentation in the IDE or generate the docs. How can I escape square brackets/other symbols in Dokka/Kdoc?

over 4 years ago · Santiago Trujillo
2 answers
Answer question

0

You can use HTML escaping:

 /**
   * @param scrollFraction In range [0..1].
   */

should output in Dokka as range [0..1]., since [ escapes as [ and ] escapes as ].

Note this will not work inside a section of inline code (between grave accents - like this).
For such cases use square brackets ([ and ]) normally, as was suggested in Demigod's answer.

over 4 years ago · Santiago Trujillo Report

0

You should be able to do it using ` symbol, like this:

 /**
  * @param scrollFraction In range `[0..1]`.
  */
over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!