Skip to content

#582: Fix Markdown importer dropping items after a code block following a title - #583

Merged
redcatbear merged 3 commits into
itsallcode:mainfrom
koppor:bugfix/582_code_block_after_section_title
Sep 5, 2026
Merged

#582: Fix Markdown importer dropping items after a code block following a title#583
redcatbear merged 3 commits into
itsallcode:mainfrom
koppor:bugfix/582_code_block_after_section_title

Conversation

@koppor

Copy link
Copy Markdown
Contributor

Fixes#582: a fenced code block whose opening fence directly follows a section title made the importer silently drop every specification item after the block, because the TITLE state had no CODE_BEGIN transition and the closing fence then opened a phantom code block. This adds the missing TITLE → CODE_BLOCK transition, a regression test (verified to fail without the fix), and a changelog entry.

AI assistance note: analysis, fix, and test were written with Claude Code and reviewed by me; mvn -T 1C verify (incl. self-trace) passes.

🤖 Generated with Claude Code

https://claude.ai/code/session_014Hgw7DCVCJ6hEmxYz5cU8K

… following a title
The TITLE parser state had no transition for an opening code fence, so the
fence fell through to EVERYTHING and the closing fence then opened a phantom
code block that swallowed the rest of the file.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014Hgw7DCVCJ6hEmxYz5cU8K
@koppor

Copy link
Copy Markdown
ContributorAuthor

Fix seems to be straight-forward. Would really help us while using OFT.

@redcatbearredcatbear left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add a second requirement to the unit test.

A --> B
```

`req~example~1`

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think adding a second requirement for safety here would be good to prove that the next ones are not dropped.

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added req~example~2 right after — the test now asserts both items are detected.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks. Perfect.

@github-project-automationgithub-project-automationBot moved this from 📫 Backlog to 🔨 In Progress in OpenFastTraceSep 4, 2026
A --> B
```

`req~example~1`

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks. Perfect.

@redcatbearredcatbear added bug ai-assisted Written with the help of an LLM labels Sep 5, 2026
@redcatbear
redcatbear merged commit 5ebf14b into itsallcode:mainSep 5, 2026
11 checks passed
@github-project-automationgithub-project-automationBot moved this from 🔨 In Progress to ✅ Closed in OpenFastTraceSep 5, 2026
@redcatbear

Copy link
Copy Markdown
Collaborator

Thank you @koppor for contributing this bug fix. Very much appreciated!

@koppor
koppor deleted the bugfix/582_code_block_after_section_title branch September 5, 2026 09:55
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ai-assistedWritten with the help of an LLMbug

Projects

Status: ✅ Closed

Development

Successfully merging this pull request may close these issues.

Markdown importer silently drops all requirements after a fenced code block that directly follows a heading

2 participants

@koppor@redcatbear