When running the normal mdpdf <source> <destination> [options] command, the generated pdf file will not have the details tabs open by default if the open attribute is not set on the details tags.
Problem Description
Some may want to have the details tabs open when generating the pdf file, but the current implementation does not allow for this without a manual change to the markdown file.
Solution Proposal
Add a new cli parameter to the mdpdf command that will allow the user to specify that the details tabs should be open by default when generating the pdf file. I'm no expert in javascript and haven't looked at the code, but I think you could iterate over the details tags and set the open attribute to true if the new cli parameter is set.
Additional Context
To reproduce the issue, create a markdown file with the following content:
# Test
<details>
<summary>Click me</summary>
I'm open by default
</details>
mdpdf test.md test.pdf
The generated pdf file will have the details tab closed by default.
Issue
When running the normal
mdpdf <source> <destination> [options]
command, the generated pdf file will not have the details tabs open by default if theopen
attribute is not set on the details tags.Problem Description
Some may want to have the details tabs open when generating the pdf file, but the current implementation does not allow for this without a manual change to the markdown file.
Solution Proposal
Add a new cli parameter to the
mdpdf
command that will allow the user to specify that the details tabs should be open by default when generating the pdf file. I'm no expert in javascript and haven't looked at the code, but I think you could iterate over the details tags and set theopen
attribute to true if the new cli parameter is set.Additional Context
To reproduce the issue, create a markdown file with the following content:
The generated pdf file will have the details tab closed by default.