eclipse-jdt / eclipse-jdt/eclipse.jdt.core
[Markdown] "}" inside {@snippet} content prematurely terminates child fragments
- Dominant language
- Java
- Stars
- 236
- Forks
- 196
- Avg merge
- 1d 10h
- Merged PRs (30d)
- 49
Description
```
/// Example showing formatter bug with {@code @} in snippet blocks.
/// {@snippet :
/// public class Example {
/// private String field;
/// }
/// void foo();
/// }
```
When parsing Markdown Javadoc comments containing a {@snippet} tag, encountering a } character inside the snippet content prematurely terminates subsequent child fragments in the generated AST. As a result, all remaining TextElements after the } inside the snippet content are omitted, including valid trailing snippet content such as class closing braces and method declarations.
I suspect this behaviour is related to the [markdown support for the snippet tag](https://github.com/eclipse-jdt/eclipse.jdt.core/pull/5003).
Contributor guide
Assessment
This issue has not been assessed yet.