Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions doc/changes/changes_4.10.0.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ Each release now includes an SPDX 3 SBOM for the product JAR and a SHA-256 check

* #542: CI and releases now provide an SPDX 3 SBOM.

## Bugfixes

* #582: Fixed the Markdown importer silently dropping all specification items after a fenced code block that directly follows a section title.

## Documentation

* #579: Documented planned deprecations and removals.
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ protected Transition[] configureTransitions()
transition(TITLE , TITLE , MdPattern.UNDERLINE , () -> {} ),
transition(TITLE , TITLE , MdPattern.EMPTY , () -> {} ),
transition(TITLE , START , MdPattern.FORWARD , () -> {forward(); resetTitle();} ),
transition(TITLE , CODE_BLOCK , MdPattern.CODE_BEGIN , this::resetTitle ),
transition(TITLE , START , MdPattern.EVERYTHING , this::resetTitle ),

transition(SPEC_ITEM , SPEC_ITEM , MdPattern.ID , this::beginItem ),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -242,6 +242,25 @@ void testWhenInsideMarkdownCodeBlockThenNoSpecificationItemMustBeDetected(final
emptyIterable());
}

@Test
void testWhenCodeBlockDirectlyFollowsTitleThenFollowingSpecificationItemMustBeDetected()
{
assertImport("code_block_after_title.md", """
## A diagram before any requirement

```mermaid
graph TD
A --> B
```

`req~example~1`
""",
contains(item()
.id(SpecificationItemId.parseId("req~example~1"))
.location("code_block_after_title.md", 8)
.build()));
}

@ParameterizedTest
@CsvSource(
{
Expand Down