RFR: 8277026: Remove blank lines remaining from snippet markup
Pavel Rappo
prappo at openjdk.java.net
Tue Nov 30 21:08:04 UTC 2021
On Tue, 30 Nov 2021 20:59:55 GMT, Jonathan Gibbons <jjg at openjdk.org> wrote:
>> This PR proposes to omit lines from the snippet source if those lines consist only of markup and perhaps whitespace. For example, if this PR is integrated, these three snippets will result in the same output:
>>
>> // @start region="example1"
>> if (v.isPresent()) {
>> System.out.println("v: " + v.get());
>> } // @end
>>
>>
>> if (v.isPresent()) { // @start region="example2"
>> System.out.println("v: " + v.get());
>> } // @end
>>
>>
>> // @start region="example3" :
>> if (v.isPresent()) {
>> System.out.println("v: " + v.get());
>> // @end :
>> }
>>
>> While this change complicates the mental model for markup, it removes otherwise unavoidable inner blank lines in properties files, for example:
>>
>> coffee=espresso
>> # @highlight:
>> tea=ice
>
> src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/taglets/snippet/Style.java line 53:
>
>> 51:
>> 52: /**
>> 53: * A marker of belonging to markup. Characters of this style are typically
>
> The initial sentence is a little awkward. Can it be rephrased to be clearer?
Are you referring to this?
> A named style.
Feel free to take a stab at it; I'm not good with words.
-------------
PR: https://git.openjdk.java.net/jdk/pull/6623
More information about the javadoc-dev
mailing list