From 5d4ec207ed0c48b29ac456571585c1338b43aed9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Felix=20M=C3=BCller?= Date: Tue, 3 Feb 2026 10:53:38 +0100 Subject: [PATCH] fix: clarify allowed tags prompt --- src/scribae/init_cli.py | 6 +++--- tests/unit/init_cli_test.py | 14 ++++++++++++-- 2 files changed, 15 insertions(+), 5 deletions(-) diff --git a/src/scribae/init_cli.py b/src/scribae/init_cli.py index 2d71bfe..b6f9687 100644 --- a/src/scribae/init_cli.py +++ b/src/scribae/init_cli.py @@ -101,9 +101,9 @@ def _collect_project_config() -> ProjectConfig: ) allowed_tags_raw = _prompt_text( - "Allowed HTML tags", - "Optional allowlist for HTML tags in generated content; leave blank for no restriction.", - "p, em, strong, a", + "Allowed metadata tags", + "Optional allowlist for metadata tags in generated content; leave blank for no restriction.", + "product-analytics, case-study, compliance", default="", show_default=False, ) diff --git a/tests/unit/init_cli_test.py b/tests/unit/init_cli_test.py index b3e47e4..906a0de 100644 --- a/tests/unit/init_cli_test.py +++ b/tests/unit/init_cli_test.py @@ -18,7 +18,7 @@ def _questionnaire_input() -> str: "friendly and practical", "seo, content strategy", "en", - "p, em, a", + "product-analytics, case-study, compliance", ] ) + "\n" @@ -37,7 +37,17 @@ def test_init_writes_config_in_current_dir() -> None: assert payload["tone"] == "friendly and practical" assert payload["keywords"] == ["seo", "content strategy"] assert payload["language"] == "en" - assert payload["allowed_tags"] == ["p", "em", "a"] + assert payload["allowed_tags"] == ["product-analytics", "case-study", "compliance"] + + +def test_init_prompts_allowed_tag_example() -> None: + with runner.isolated_filesystem(): + result = runner.invoke(app, ["init"], input=_questionnaire_input()) + + assert result.exit_code == 0 + output = strip_ansi(result.output) + assert "Allowed metadata tags" in output + assert "Example: product-analytics, case-study, compliance" in output def test_init_writes_config_in_project_dir() -> None: