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

problem when omitting closing tags inside div #10514

Open
pi3141 opened this issue Jan 8, 2025 · 1 comment
Open

problem when omitting closing tags inside div #10514

pi3141 opened this issue Jan 8, 2025 · 1 comment
Labels

Comments

@pi3141
Copy link

pi3141 commented Jan 8, 2025

Explain the problem.

If I omit to close td tags, I have three trailing colons after the table and a warning of a non-closing div, even if the html is valid.

test.md :

::: mydiv

<table>
  <tr>
    <td>cell A
    <td>cell B
    <td>cell C
  <tr>
    <td>cell D
    <td>cell E
    <td>cell F
</table>

:::

command
pandoc test.md -o test.pdf

output
image

the warning :

[WARNING] Div at test.md line 1 column 1 unclosed at test.md line 17 column 1, closing implicitly.

Pandoc version?
pandoc 3.6, Linux debian 6.1.0-11-amd64

@pi3141 pi3141 added the bug label Jan 8, 2025
@jgm
Copy link
Owner

jgm commented Jan 8, 2025

Pandoc has some logic to deal with nested divs and HTML; this is complicated and doesn't always work properly.

Best approach in cases like this is to mark this explicitly as HTML:

::: mydiv
```{=html}
<table>
  <tr>
    <td>cell A
    <td>cell B
    <td>cell C
  <tr>
    <td>cell D
    <td>cell E
    <td>cell F
</table>
```
:::

Or use -f commonmark_x.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants