We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5c7be8c commit fecb4b8Copy full SHA for fecb4b8
mdformat_mkdocs/_helpers.py
@@ -52,9 +52,8 @@ def separate_indent(line: str) -> tuple[str, str]:
52
53
def get_conf(options: ContextOptions, key: str) -> bool | str | int | None:
54
"""Read setting from mdformat configuration Context."""
55
- cli_or_toml = (
+ if (api := options["mdformat"].get(key)) is not None:
56
+ return api # From API
57
+ return (
58
options["mdformat"].get("plugin", {}).get(__plugin_name__, {}).get(key)
- )
- if cli_or_toml is None:
59
- return options["mdformat"].get(key) # From API
60
- return cli_or_toml
+ ) # from cli_or_toml
0 commit comments