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:
2026-07-26 21:20:34 -04:00
parent fe59a7c22c
commit ef384b9c7c
2 changed files with 20 additions and 6 deletions
+1 -1
View File
@@ -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: