Skip to content

New Markdown Javadoc formatter incorrectly merges code blocks into preceding line #4694

@garretwilson

Description

@garretwilson

I'm using Eclipse EE 2025-12 (4.38.0), which has support for formatting JEP 467 Markdown Javadoc comments. (This functionality is presumably for issue #4337 and pull request #4418, which is odd because that neither of those were closed. So where is the implementation tickets to file this bug against?)

Formatting a Markdown Javadoc comment with code block incorrectly joins the code blocks with previous lines. (See also the similar issues encountered with line splitting and block formatting in the old-style HTML Javadocs discussed in #991.)

Start with a comment like this:

/// To create rows for storage, use [Row#of] factories or [Row#builder()]:
/// ```java
/// Row row = Row.of(userId, "user123", age, 25);
/// tableDb.put(tableName, row).join();
/// ```

After formatting, that produces:

/// To create rows for storage, use [Row#of] factories or [Row#builder()]: ```java Row row = Row.of(userId, "user123", age, 25); tableDb.put(tableName,
/// row).join(); ```

That is broken. I'll have to turn off Markdown formatting altogether for now. (Maybe that's why #4337 was never closed—it was never implemented?)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions