Skip to content

Tables nested in list items have empty lines #368

@Witiko

Description

@Witiko

When a table is at the top of the document, it is parsed correctly:

$ texlua markdown-cli.lua pipeTables=true <<< '
| aaa | bbb | ccc |
|-----|-----|-----|
| aaa | bbb | ccc |
| aaa | bbb | ccc |
'
\markdownRendererDocumentBegin
\markdownRendererTable{}{3}{3}{ddd}{{aaa}{bbb}{ccc}}{{aaa}{bbb}{ccc}}{{aaa}{bbb}{ccc}}
\markdownRendererDocumentEnd

However, when a table is nested in a list, empty lines are added to the table:

$ texlua markdown-cli.lua pipeTables=true <<< '
- aaa:

    | aaa | bbb | ccc |
    |-----|-----|-----|
    | aaa | bbb | ccc |
    | aaa | bbb | ccc |
'
\markdownRendererDocumentBegin
\markdownRendererUlBegin
\markdownRendererUlItem aaa:
\markdownRendererInterblockSeparator
\markdownRendererTable{}{5}{3}{ddd}{{aaa}{bbb}{ccc}}{{}{}{}}{{aaa}{bbb}{ccc}}{{}{}{}}{{aaa}{bbb}{ccc}}
\markdownRendererUlItemEnd 
\markdownRendererUlEnd
\markdownRendererDocumentEnd

Metadata

Metadata

Assignees

Labels

bugcommonmarkRelated to making the syntax of markdown follow the CommonMark spec

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions