On Tue, 30 Jan 2024 23:15:32 GMT, Jonathan Gibbons <j...@openjdk.org> wrote:

>> src/jdk.compiler/share/classes/com/sun/tools/javac/tree/DocTreeMaker.java 
>> line 790:
>> 
>>> 788: 
>>> 789:         // end of paragraph is newline, followed by a blank line or 
>>> the beginning of the next block
>>> 790:         private static final Pattern endPara = Pattern.compile("\n(([ 
>>> \t]*\n)|( {0,3}[-+*#=]))");
>> 
>> So DocTreeMaker now also knows about Markdown. I wonder if we can avoid 
>> that. Also, I assume you mean this (`+` is not a part of "thematic break"):
>> Suggestion:
>> 
>>         private static final Pattern endPara = Pattern.compile("\n(([ 
>> \t]*\n)|( {0,3}[-_*#=]))");
>
> The code is doing its best to model the non-Markdown behavior, which is to 
> detect paragraph breaks, which terminate the first sentence in the absence of 
> any period.
> 
> `+` is in the pattern as a list marker; I added `_` for thematic break, and 
> added more comments.

I can see that you have fixed it to recognise lists `+` and thematic breaks 
`_`; good.

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

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

Reply via email to