ktfmt icon indicating copy to clipboard operation
ktfmt copied to clipboard

Support for tables in KDoc

Open sgrimm opened this issue 3 years ago • 0 comments

ktfmt does not recognize Markdown table syntax.

Before:

  /**
   * Here is a table.
   * 
   * | Column 1 | Column 2 | Column 3 |
   * | -------- | -------- | -------- |
   * | 1        | 2        | 3        |
   * | 4        | 5        | 6        |
   */

After:

  /**
   * Here is a table.
   *
   * | Column 1 | Column 2 | Column 3 | | -------- | -------- | -------- | | 1 | 2 | 3 | | 4 | 5 | 6
   * |
   */

Workaround is to wrap the table in triple backticks but then it's not rendered as a real table by KDoc processors.

sgrimm avatar Jun 23 '22 17:06 sgrimm