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

Empty SimpleTable contains empty caption and empty TableBody #7776

Closed
not-my-profile opened this issue Dec 24, 2021 · 1 comment
Closed

Empty SimpleTable contains empty caption and empty TableBody #7776

not-my-profile opened this issue Dec 24, 2021 · 1 comment

Comments

@not-my-profile
Copy link
Contributor

Explain the problem.

$ echo '<div></div>' | pandoc -L <(echo 'function Div(_) return {pandoc.Table({long={}}, {}, {{}, {}}, {}, {{}, {}}, {})} end')          
<table>

</table>
$ echo '<div></div>' | pandoc -L <(echo 'function Div(_) return {pandoc.utils.from_simple_table(pandoc.SimpleTable({}, {}, {}, {}, {}))} end')
<table>
<caption></caption>
<tbody>
</tbody>
</table>

Notice how the SimpleTable API results in an empty caption and an empty tbody. I would expect there to be some checks to omit these if they are empty.

Pandoc version?
pandoc 2.16.2 on Linux

@tarleb
Copy link
Collaborator

tarleb commented Dec 25, 2021

Thanks for the report.

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

No branches or pull requests

2 participants