You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, mdformat plugins are allowed to implement a add_cli_options function to add arguments to the mdformatArgumentParser, but there is no way to allow those options to be added to the .mdformat.toml file without monkey patching the mdformat._conf module to add the new options to the DEFAULT_OPTS dictionary or _validate_keys and _validate_values functions.
Proposal
Add a way for plugins to declare acceptable options and values for the mdformat.toml file.
Along the way, maybe also slightly reformat how the options are declared, so that they are not hard-coded in two different places (_conf and _cli) independently. An option for this would be to have them declared only inside _conf, with a way for plugins to alter them, and then have both the _cli.ArgumentParser and the _conf validation functions read and use them.
Tasks and updates
No response
The text was updated successfully, but these errors were encountered:
Context
Currently,
mdformat
plugins are allowed to implement aadd_cli_options
function to add arguments to themdformat
ArgumentParser
, but there is no way to allow those options to be added to the.mdformat.toml
file without monkey patching themdformat._conf
module to add the new options to theDEFAULT_OPTS
dictionary or_validate_keys
and_validate_values
functions.Proposal
Add a way for plugins to declare acceptable options and values for the
mdformat.toml
file.Along the way, maybe also slightly reformat how the options are declared, so that they are not hard-coded in two different places (
_conf
and_cli
) independently. An option for this would be to have them declared only inside_conf
, with a way forplugins
to alter them, and then have both the_cli.ArgumentParser
and the_conf
validation functions read and use them.Tasks and updates
No response
The text was updated successfully, but these errors were encountered: