Skip to content

Commit f839dfd

Browse files
SougandhSmerks
authored andcommitted
Add N&N for Markdown Synatx Formatting
see eclipse-jdt/eclipse.jdt.core#4244
1 parent c502276 commit f839dfd

File tree

2 files changed

+19
-3
lines changed

2 files changed

+19
-3
lines changed
638 KB
Loading

news/4.39/jdt.md

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -120,10 +120,26 @@ results in:
120120
## Java Compiler
121121
-->
122122

123-
<!--
124-
---
125123
## Java Formatter
126-
-->
124+
125+
### Support for Markdown Syntax in Java Comment Formatting
126+
127+
<details>
128+
<summary>Contributors</summary>
129+
130+
- [Sougandh S](https://github.com/SougandhS)
131+
- [Mateusz Matela](https://github.com/mateusz-matela)
132+
</details>
133+
134+
When `Enable Markdown Javadoc formatting` is enabled, the `formatter` now recognizes structured Markdown syntax inside `///` comments and formats it appropriately instead of treating it as plain text.
135+
Supported elements include __headings__, __ordered__ and __unordered lists__ (with proper nesting), __fenced__ and __indented code blocks__, __tables__ and __markdown-style tag annotations__.
136+
137+
Nested lists are aligned consistently, wrapped list items preserve correct indentation, and fenced code blocks (both ` ``` ` and `~~~` styles) are recognized and their enclosed code snippets are formatted while preserving structure.
138+
The formatter also validates and handles malformed list or numbering patterns gracefully without disrupting the surrounding content.
139+
140+
![Markdown Formatter](images/MarkdownTagFormatting.gif)
141+
142+
The formatting behavior follows the [CommonMark specification](https://spec.commonmark.org/), ensuring consistent and predictable Markdown structure handling.
127143

128144
## Debugger
129145

0 commit comments

Comments
 (0)