fix(docs): scope aside regression test to its contents, reject nested file trees
- test_customization_notes_render_as_aside now asserts the four NOTE bullets live inside the <Aside> tags, not merely anywhere on the page — a re-wrapped bullet previously still passed because the bullet text leaked into an untouched sibling paragraph. - TREE_BRANCH_RE no longer matches an indented/continuation branch line (dropped the leading `[│ ]*`), so a second-level tree falls through to verbatim rendering instead of being silently flattened to one level. Added test_as_file_tree_rejects_deeper_trees to guard it.
This commit is contained in:
@@ -315,7 +315,7 @@ def _as_ruled_table(para: list[str]) -> str | None:
|
||||
|
||||
|
||||
TREE_ROOT_RE = re.compile(r"^[~$][\w./{}-]*/$")
|
||||
TREE_BRANCH_RE = re.compile(r"^[│ ]*[├└]──\s*(\S+)\s*(.*)$")
|
||||
TREE_BRANCH_RE = re.compile(r"^[├└]──\s*(\S+)\s*(.*)$")
|
||||
|
||||
|
||||
def _as_file_tree(para: list[str]) -> str | None:
|
||||
|
||||
Reference in New Issue
Block a user