On Tue, 30 Nov 2021 19:47:35 GMT, Pavel Rappo <[email protected]> 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
This pull request has now been integrated.
Changeset: da2be99c
Author: Pavel Rappo <[email protected]>
URL:
https://git.openjdk.java.net/jdk/commit/da2be99cfe1121d5a59fa575ea0ac425ad4dbd0f
Stats: 251 lines in 7 files changed: 240 ins; 2 del; 9 mod
8277026: Remove blank lines remaining from snippet markup
Reviewed-by: jjg
-------------
PR: https://git.openjdk.java.net/jdk/pull/6623