Skip to content

Commit

Permalink
Changed the description of the argument fully_normalize_name_slug_func.
Browse files Browse the repository at this point in the history
  • Loading branch information
Spirual committed Jan 28, 2025
1 parent e6b4c06 commit 19fb92c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
4 changes: 2 additions & 2 deletions myst_parser/config/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -312,8 +312,8 @@ def __repr__(self) -> str:
metadata={
"validator": check_heading_slug_func,
"help": (
"Return a case- and whitespace-normalized name."
"or a python import path e.g. `my_package.my_module.my_function`"
"Function for normalizing text to valid html id value, "
"or a python import path e.g. `my_package.my_module.my_function` "
"It can be used to transliterate any language to valid stable html identifiers"
),
"global_only": True,
Expand Down
5 changes: 4 additions & 1 deletion myst_parser/parsers/docutils_.py
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,10 @@ def _attr_to_optparse_option(at: Field, default: Any) -> tuple[dict[str, Any], s
"metavar": "<boolean>",
"validator": frontend.validate_boolean,
}, str(default)
if at.type is str or at.name in ("heading_slug_func", "fully_normalize_name_slug_func"):
if at.type is str or at.name in (
"heading_slug_func",
"fully_normalize_name_slug_func",
):
return {
"metavar": "<str>",
}, f"(default: '{default}')"
Expand Down

0 comments on commit 19fb92c

Please sign in to comment.