sergiocorreia / panflute

An Pythonic alternative to John MacFarlane's pandocfilters, with extra helper functions
http://scorreia.com/software/panflute/
BSD 3-Clause "New" or "Revised" License
500 stars 59 forks source link

Allow Table class to have no caption #215

Closed jacobwhall closed 2 years ago

jacobwhall commented 2 years ago

The Table class __init__ function defaults to setting the caption parameter to None:

https://github.com/sergiocorreia/panflute/blob/354297b90b763f99dee270b9e180baa21187cd64/panflute/table_elements.py#L69-L70

However, creating a Table with caption=None currently throws an error. This PR allows for the caption parameter to equal None.

I would be happy to write a test for this if you feel it would be appropriate.

Addresses #209, and possibly #206.