jmaupetit / md2pdf

Markdown to PDF conversion tool
MIT License
268 stars 41 forks source link

Include custom extras #51

Closed gabrielbdornas closed 10 months ago

gabrielbdornas commented 1 year ago

Hello, my friends!

First of all, thank you to merge my last PR!

As I said there I've been using it quite a lot recently and encountered another situation where more extras were necessary. Instead of hard coding it, as in the last PR, I think a flow to allow users to indicate one or more extras during the conversion, for example:

md2pdf README.md README.pdf --new-extras=fenced-code-blocks

md2pdf README.md README.pdf --new-extras=fenced-code-blocks,mermaid

I'm not sure my approach to solving the problem is the better option, so I'm looking forward to your feedback.

I made some manual tests locally and everything went well, but when I tried to run pytest it run an error that I couldn't understand:

(venv) ➜  md2pdf git:(include-custom-extras) pytest                        
ERROR: usage: pytest [options] [file_or_dir] [file_or_dir] [...]
pytest: error: unrecognized arguments: --cov=md2pdf --cov-report
  inifile: /home/gabrielbdornas/code/gabrielbdornas/md2pdf/setup.cfg
  rootdir: /home/gabrielbdornas/code/gabrielbdornas/md2pdf

I hope you guys found it useful as well.

Obs.: I didn't update the package version because I didn't how it is managed by you.

Thanks in advance for the opportunity to help!