Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Code blocks in requirements break parsing #280

Closed
jakobbraun opened this issue Jun 9, 2021 · 3 comments · Fixed by #433
Closed

Code blocks in requirements break parsing #280

jakobbraun opened this issue Jun 9, 2021 · 3 comments · Fixed by #433
Labels

Comments

@jakobbraun
Copy link

Adding a code block like:

```md
## Test

test 123
```

... to the requirements file breaks the parsing. OFT seems to detect it as a new requirement.

Expected Behaviour:

  • OFT ignored the headline in the code block (important)
  • OFT prints the contents of the code block formated as code in the HTML output (nice to have)
@jakobbraun jakobbraun added the bug label Jun 9, 2021
@redcatbear
Copy link
Collaborator

I think I can solve this by adding a new state in the markdown parser that ignores literal sections (starting and ending with tripple-backticks).

@redcatbear redcatbear moved this from 📫 Backlog to ▶️ Ready to Start in OpenFastTrace Feb 11, 2024
@kaklakariada kaklakariada added feature and removed bug labels Mar 1, 2024
@koppor
Copy link

koppor commented Sep 6, 2024

Similar behavior when requirement ids are in the blocks

Example

...

```markdown
### Chatting with AI
`req~ai.chat.new-message-based-on-previous~1`
```

Then, at the implementation, a comment is added this implementation is covered:

```java
} else if (keyEvent.getCode() == KeyCode.UP) {
    // [impl->req~ai.chat.new-message-based-on-previous~1]
```

@redcatbear
Copy link
Collaborator

I checked the GMF spec from which the fenced code blocks come. That spec allows quite a range of variants to start a code block. I tried to capture the reasonable part in the parser in #433 without making it a lot more complex.

redcatbear added a commit that referenced this issue Jan 6, 2025
* #280: Inside Markdown code blocks requirements are now ignored (see https://github.github.com/gfm/#fenced-code-blocks for specification).
@github-project-automation github-project-automation bot moved this from ▶️ Ready to Start to ✅ Closed in OpenFastTrace Jan 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

4 participants