Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I make a nested list in Dokka?

Trying to document some Kotlin code with a pretty routine structure:

  1. A numbered list.
    • With a bulleted sublist.
  2. Where the numbers continue correctly at the top level of the list.

What I take to be the official Dokka page doesn't even have the word "list" on the page. Have Googled hither and yon without finding any info on how to do this. Help!

like image 884
0xbe5077ed Avatar asked Jan 03 '23 16:01

0xbe5077ed


2 Answers

As far as I can see, nesting with additional indentation of four spaces works:

/**
 * 1. A numbered list.
 *     * With a bulleted sublist.
 * 1. Where the numbers continue correctly at the top level of the list.
 */
val foo: Int = 0

The result is:

enter image description here

like image 182
hotkey Avatar answered Jan 05 '23 15:01

hotkey


Dokka uses markdown, which has some forks and flavors and not standardized at all, but this works:

/**
 * list:
 * - item1
 * - item2
 *
 * numbered:
 * 1. one
 * 2. two
 */

this is what it will look like

like image 21
kocka Avatar answered Jan 05 '23 15:01

kocka