Allow a group to be specified when getting the available options

This commit is contained in:
Raoul Snyman 2021-08-02 13:58:22 -07:00
parent 17e5d7aa0e
commit 2f7e5a222f

View File

@ -348,9 +348,12 @@ HTML_OPTIONS = {
OPTION_GROUPS = set([option['group'] for option in HTML_OPTIONS])
def get_options():
def get_options(group=None):
"""Return the options supported by the HTML renderer"""
return HTML_OPTIONS
if not group:
return HTML_OPTIONS
else:
return {key: value for key, value in HTML_OPTIONS.items() if value['group'] == group}
def make_style(name, font=None, size=None, is_bold=None, is_centered=None, is_upper=None, indent=None):