Skip to content

Convert Javadoc <br> tags to Markdown line breaks#1142

Merged
timtebeek merged 1 commit into
mainfrom
tim/javadoc-markdown-br-cleanup
Jun 24, 2026
Merged

Convert Javadoc <br> tags to Markdown line breaks#1142
timtebeek merged 1 commit into
mainfrom
tim/javadoc-markdown-br-cleanup

Conversation

@timtebeek

Copy link
Copy Markdown
Member

The JavadocToMarkdownDocComment recipe previously emitted <br> tags verbatim because they fell through to the default unknown-HTML-element case. This adds a case "br" that ends the current line, and a suppressNextLineBreak flag so a <br> at the end of a physical line collapses with the following line break instead of producing a spurious blank line (a redundant <br> before a <p> is absorbed by the existing blank-line collapsing). Two tests cover a <br> before a <p> and a mid-text <br> split across two /// lines.

@github-project-automation github-project-automation Bot moved this to In Progress in OpenRewrite Jun 24, 2026
@timtebeek timtebeek merged commit 79e5222 into main Jun 24, 2026
1 check passed
@timtebeek timtebeek deleted the tim/javadoc-markdown-br-cleanup branch June 24, 2026 08:25
@github-project-automation github-project-automation Bot moved this from In Progress to Done in OpenRewrite Jun 24, 2026
timtebeek added a commit that referenced this pull request Jun 24, 2026
…ytecode source/target compatibility (#1143)

* Fix JavadocToMarkdown's handling of <br>, varargs, type parameters, jdks newer than the bytecode source/target compatibility

* Remove duplicate tests that overlap with #1141 and #1142 after merge

---------

Co-authored-by: Tim te Beek <tim@moderne.io>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

1 participant