eclipse-jdt / eclipse.jdt.ui

Eclipse Public License 2.0
36 stars 86 forks source link

JEP 467 adjust heading levels? #1582

Closed stephan-herrmann closed 1 month ago

stephan-herrmann commented 1 month ago

Follow-up after #1523: according to https://openjdk.org/jeps/467#API-and-implementation headings inside markdown comments should potentially be adjusted depending on context:

"The heading level is adjusted according to the enclosing context. This applies whether the heading was initially written in the documentation comment as an ATX-style heading (using a prefix of # characters to indicate the level) or as a Setext-style heading (using underlining with = or - to indicate the level).

For example, a level 1 heading in the documentation comment for a module, package, or class is rendered as a level 2 heading in the generated page, while a level 1 heading in the documentation comment for a field, constructor, or method is rendered as a level 4 heading in the generated page.

This adjustment applies only to Markdown headings, not to any direct use of HTML headings."

OTOH, JDT/UI could also argue that javadoc view and hovers don't generate a full documentation page, so there are no enclosing sections and hence section headings don't need to be fitted into such overall structure.

stephan-herrmann commented 1 month ago

Thinking more about it I don't see a need for any such adjustments.