Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tables nested in list items have empty lines #368

Closed
Witiko opened this issue Nov 8, 2023 · 0 comments · Fixed by #371
Closed

Tables nested in list items have empty lines #368

Witiko opened this issue Nov 8, 2023 · 0 comments · Fixed by #371
Assignees
Labels
bug commonmark Related to making the syntax of markdown follow the CommonMark spec
Milestone

Comments

@Witiko
Copy link
Owner

Witiko commented Nov 8, 2023

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
@Witiko Witiko added bug commonmark Related to making the syntax of markdown follow the CommonMark spec labels Nov 8, 2023
@Witiko Witiko added this to the 3.3.0 milestone Nov 8, 2023
@Witiko Witiko linked a pull request Nov 13, 2023 that will close this issue
@Witiko Witiko modified the milestones: 3.3.0, 3.2.1 Nov 23, 2023
Witiko added a commit that referenced this issue Jan 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug commonmark Related to making the syntax of markdown follow the CommonMark spec
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants