Skip to content

Add support for table alignment #4441

@yuriioliinyk4

Description

@yuriioliinyk4

Dokka doesn't support table alignment.

Example:

/**
 * | Left-aligned | Center-aligned | Right-aligned |
 * |:-------------|:-------------:|-------------:|
 * | Left | Center | Right |
 * | Left | Center | Right |
 */

Dokka output:

Image

IDE output as example:

Image

Javadoc
Table alignment is not supported in Javadoc as well, in particular in Javadoc Markdown comments.
For this example:

/// | Left-aligned | Center-aligned | Right-aligned |
/// |:-------------|:-------------:|-------------:|
/// | Left | Center | Right |
/// | Left | Center | Right |

MarkdownToHtmlConverter is returning:

<table>
  <thead>
    <tr>
      <th>Left-aligned</th>
      <th align="center">Center-aligned</th>
      <th align="right">Right-aligned</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>Left</td>
      <td align="center">Center</td>
      <td align="right">Right</td>
    </tr>
    <tr class="intellij-row-even">
      <td>Left</td>
      <td align="center">Center</td>
      <td align="right">Right</td>
    </tr>
  </tbody>
</table>

So, these html tags with parameters should also be supported.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementAn issue for a feature or an overall improvement

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions