Skip to content

"MARKDOWN" style does not create tables using the minimum 3 hyphens  #39

@michael-nok

Description

@michael-nok

Markdown tables require that we define them using three or more hyphens (---) to create each column’s header. Without three hyphens, certain systems will not interpret this information as a table (for example, DITA-OT transformation to PDF).

Table definition: https://www.markdownguide.org/extended-syntax/#tables

Sample source file: https://github.com/Neoteroi/mkdocs-plugins/blob/main/tests/res/swagger.json

Example command:

oad gen-docs -s json/swagger.json -d docs/swagger.md --style "MARKDOWN"

This is the current Markdown output when using --style "MARKDOWN"

### Cat

| Name | Type |
| -- | -- |                    // This is invalid
| age | integer |
| hunts | boolean |

However, it should in fact be the following:

### Cat

| Name | Type |
| --- | --- |                  // This is valid
| age | integer |
| hunts | boolean |

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions