From 7b2fd41279b7a13e1a61c315c90df6e6c61e8e84 Mon Sep 17 00:00:00 2001 From: Yudai NAKATA Date: Sat, 21 Nov 2020 03:54:35 +0900 Subject: [PATCH 1/3] Make usage heading bold --- mkdocs_click/_docs.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mkdocs_click/_docs.py b/mkdocs_click/_docs.py index a1d19d9..96b68e2 100644 --- a/mkdocs_click/_docs.py +++ b/mkdocs_click/_docs.py @@ -92,7 +92,7 @@ def _make_usage(ctx: click.Context) -> Iterator[str]: full_path.reverse() usage_snippet = " ".join(full_path) + usage - yield "Usage:" + yield "**Usage:**" yield "" yield "```" yield usage_snippet From 8ed502beaf916478ded5288ed50a03dabde9608d Mon Sep 17 00:00:00 2001 From: Yudai NAKATA Date: Sat, 21 Nov 2020 03:55:10 +0900 Subject: [PATCH 2/3] Update test --- tests/app/expected.md | 8 ++++---- tests/unit/test_docs.py | 6 +++--- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/tests/app/expected.md b/tests/app/expected.md index 95b47a0..5c360ff 100644 --- a/tests/app/expected.md +++ b/tests/app/expected.md @@ -2,7 +2,7 @@ Main entrypoint for this dummy program -Usage: +**Usage:** ``` cli [OPTIONS] COMMAND [ARGS]... @@ -12,7 +12,7 @@ cli [OPTIONS] COMMAND [ARGS]... The bar command -Usage: +**Usage:** ``` cli bar [OPTIONS] COMMAND [ARGS]... @@ -22,7 +22,7 @@ cli bar [OPTIONS] COMMAND [ARGS]... Simple program that greets NAME for a total of COUNT times. -Usage: +**Usage:** ``` cli bar hello [OPTIONS] @@ -37,7 +37,7 @@ Options: ## foo -Usage: +**Usage:** ``` cli foo [OPTIONS] diff --git a/tests/unit/test_docs.py b/tests/unit/test_docs.py index f145777..f59e37d 100644 --- a/tests/unit/test_docs.py +++ b/tests/unit/test_docs.py @@ -22,7 +22,7 @@ def hello(): Hello, world! - Usage: + **Usage:** ``` hello [OPTIONS] @@ -74,7 +74,7 @@ def test_custom_multicommand(): Multi help - Usage: + **Usage:** ``` multi [OPTIONS] COMMAND [ARGS]... @@ -84,7 +84,7 @@ def test_custom_multicommand(): Hello, world! - Usage: + **Usage:** ``` multi hello [OPTIONS] From 38a27d9a017f235597914281d02ee384a550cec5 Mon Sep 17 00:00:00 2001 From: Yudai NAKATA Date: Sun, 13 Dec 2020 00:59:18 +0900 Subject: [PATCH 3/3] Use underscores in stead of asterisk --- mkdocs_click/_docs.py | 2 +- tests/app/expected.md | 4 ++-- tests/unit/test_docs.py | 6 +++--- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/mkdocs_click/_docs.py b/mkdocs_click/_docs.py index 96b68e2..9107fed 100644 --- a/mkdocs_click/_docs.py +++ b/mkdocs_click/_docs.py @@ -92,7 +92,7 @@ def _make_usage(ctx: click.Context) -> Iterator[str]: full_path.reverse() usage_snippet = " ".join(full_path) + usage - yield "**Usage:**" + yield "__Usage:__" yield "" yield "```" yield usage_snippet diff --git a/tests/app/expected.md b/tests/app/expected.md index 5c360ff..bfecdb2 100644 --- a/tests/app/expected.md +++ b/tests/app/expected.md @@ -22,7 +22,7 @@ cli bar [OPTIONS] COMMAND [ARGS]... Simple program that greets NAME for a total of COUNT times. -**Usage:** +__Usage:__ ``` cli bar hello [OPTIONS] @@ -37,7 +37,7 @@ Options: ## foo -**Usage:** +__Usage:__ ``` cli foo [OPTIONS] diff --git a/tests/unit/test_docs.py b/tests/unit/test_docs.py index f59e37d..4b95977 100644 --- a/tests/unit/test_docs.py +++ b/tests/unit/test_docs.py @@ -22,7 +22,7 @@ def hello(): Hello, world! - **Usage:** + __Usage:__ ``` hello [OPTIONS] @@ -74,7 +74,7 @@ def test_custom_multicommand(): Multi help - **Usage:** + __Usage:__ ``` multi [OPTIONS] COMMAND [ARGS]... @@ -84,7 +84,7 @@ def test_custom_multicommand(): Hello, world! - **Usage:** + __Usage:__ ``` multi hello [OPTIONS]