blockdiag / sphinxcontrib-blockdiag

Other
16 stars 9 forks source link

introduce blockdiag_image_format configuration #17

Open jdknight opened 2 years ago

jdknight commented 2 years ago

This commit adds support for a generic blockdiag_image_format, which could be applied for any type of builder. The goal is to provide users a means to configure non-standard builder types (which may use this extension) to hint at what type of image format they desire.


If these changes eventually moved to a state where they are merged, I can apply similar changes to the other sphinxcontrib extension of the blockdiag group.

tk0miya commented 2 years ago

+1; Reasonable. But it would be better to take a dict value that maps a format to the settings:

blockdiag_image_format = {
  'html': 'SVG',
  'latex': 'PNG',
  '*': 'PNG'
}
jdknight commented 2 years ago

@tk0miya, I have updated to use the suggested changes (thanks for the recommendation; using a dict is a way better approach). Please let me know if these changes work for you, and any other adjustments you may want.

jdknight commented 2 years ago

@tk0miya, sorry for the delay. I believe I have made the requested changes ~ please let me know if I have missed anything.