RFR: 8277026: Remove blank lines remaining from snippet markup
    Jonathan Gibbons 
    jjg at openjdk.java.net
       
    Tue Nov 30 21:03:08 UTC 2021
    
    
  
On Tue, 30 Nov 2021 19:47:35 GMT, Pavel Rappo <prappo 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?
-------------
PR: https://git.openjdk.java.net/jdk/pull/6623
    
    
More information about the javadoc-dev
mailing list