RFR: JDK-8298405: Support Markdown in Documentation Comments [v36]

Jonathan Gibbons jjg at openjdk.org
Mon Feb 19 18:23:05 UTC 2024


On Fri, 16 Feb 2024 07:42:47 GMT, Hannes Wallnöfer <hannesw at openjdk.org> wrote:

>> Jonathan Gibbons has updated the pull request incrementally with two additional commits since the last revision:
>> 
>>  - Support for Table Of Contents in Markdown headings
>>  - fix typo
>
> src/jdk.compiler/share/classes/com/sun/tools/javac/parser/DocCommentParser.java line 286:
> 
>> 284:                         lineKind = (ch == '\n' || ch == '\r') ? LineKind.BLANK
>> 285:                                 : (indent <= 3) ? peekLineKind()
>> 286:                                 : lineKind != LineKind.OTHER ? LineKind.INDENTED_CODE_BLOCK
> 
> Doesn't this cause false positives for indented code blocks? In my understanding, indented lines [in a list context](https://spec.commonmark.org/0.30/#example-258) and [directly following a blockquote](https://spec.commonmark.org/dingus/?text=%3E%20%20%20%20foo%0A%20%20%20%20%20bar%0A) are not interpreted as code blocks (always in the case of blockquote, and depending on the offset of text after the list marker in list items). 
> 
> Note: edited because my initial suggestion was incorrect.

@hns @pavelrappo noted; working on it ...

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/16388#discussion_r1494909524


More information about the build-dev mailing list