Existing code is in place from earlier blocks. Let me read the block engine and related modules before adding the indented code rule.The indented-code rule has to fit the existing per-line procedure. Before writing it, I'll check which existing tests assume four-space lines are paragraphs, since those would change behaviour.The current suite is green (755 passed). Several earlier-block tests assert that four-space lines are paragraphs, which this feature changes by definition. I'll check whether any of them are declared acceptance checks before touching them.The existing thematic-break and ATX tests that expect ` ***` or `\t# foo` to be paragraphs are finer tests, not declared acceptance checks. Under this feature those lines become code blocks, so I'll update those expectations. The declared ATX checks still hold, since `refused` has no `
` with escaped content.
- `tests/test_indented_code.py` (new): the four declared checks transcribed unchanged, plus block-tree and exact-output tests.
**Earlier tests I updated (finer tests, not declared checks)**
- `test_atx_headings.py`: ` # foo` and `\t# foo` now expect `indented_code`.
- `test_thematic_breaks.py`: ` ***` and `\t***` expect `indented_code`; the exact-output test now expects a code block.
- `test_blocks.py`: the registry start-rule list includes `INDENTED_CODE`; the leading-whitespace test uses space-only indentation, because any tab in leading whitespace reaches column 4.
- `test_block_engine.py`: ` \tword` became ` word`, for the same reason.
**Decisions**
- The start rule gates on "container accepts lines" rather than naming the paragraph type, so future leaf types that take lines get the same no-interrupt behaviour.
**Results**
- Declared checks (`test_indented_code.py`, 4 of 4): pass.
- Full `pytest -q`: 797 passed, 1 skipped (pre-existing skip in `test_foundation.py`). It was 755 passed before this change.
RESULT: SUCCESS
FILES CHANGED:
- mdparser/blocks.py
- mdparser/render.py
- tests/test_indented_code.py
- tests/test_atx_headings.py
- tests/test_thematic_breaks.py
- tests/test_blocks.py
- tests/test_block_engine.py
SUMMARY:
Added the indented code block type (start, continue, add-line, finalize) and its HTML rendering. The four declared acceptance checks pass. The full pytest suite is green at 797 passed, 1 skipped (pre-existing). Five earlier finer tests were updated to the new four-column rule; the declared ATX and thematic-break checks are unchanged. The conformance suite was not run, as this step's criteria do not invoke it.
[{"spec":"FEATURE-Indented-Code.md","severity":"Low","subject":"Start gate for indented code","decision":"The start rule refuses whenever the container is a leaf that takes lines, rather than checking for the paragraph type by name. This keeps the no-interrupt rule general. Acceptable as is?"}]