On Fri, 12 Jan 2024 17:47:06 GMT, Pavel Rappo <pra...@openjdk.org> wrote:

>> Jonathan Gibbons has updated the pull request with a new target base due to 
>> a merge or a rebase. The incremental webrev excludes the unrelated changes 
>> brought in by the merge/rebase. The pull request contains seven additional 
>> commits since the last revision:
>> 
>>  - Merge with upstream/master
>>  - Merge remote-tracking branch 'upstream/master' into 
>> 8298405.doclet-markdown-v3
>>  - Address review comments
>>  - Fix whitespace
>>  - Improve handling of embedded inline taglets
>>  - Customize support for Markdown headings
>>  - JDK-8298405: Support Markdown in Documentation Comments
>
> src/jdk.compiler/share/classes/com/sun/tools/javac/api/JavacTrees.java line 
> 992:
> 
>> 990: 
>> 991:     private static boolean isMarkdownFile(FileObject fo) {
>> 992:         return fo.getName().endsWith(".md");
> 
> I wonder why you decided to (re)implement those methods using file extension 
> matching. Is it because we don't want to introduce anything Markdown-related 
> to this method that was used to implement `isHtmlFile` previously?
>  
> https://github.com/openjdk/jdk/blob/8eb4e7e07e9211aabcb0f22696e9c572dac7a59f/src/jdk.compiler/share/classes/com/sun/tools/javac/file/BaseFileManager.java#L489-L498

Musing on this more.

Can/should we, without introducing probably unwelcome `Kind.MD` to 
`javax.tools.JavaFileObject.Kind`, teach javac to recognise `package.md` 
similarly to how it recognises legacy `package.html`? If we are aiming for 
Markdown to be a drop in replacement for traditional javadoc comments, we might 
want to go the extra mile.

I'm pleased to see that Markdown `-overview` files work just fine.

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

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

Reply via email to