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
Nice.
I guess I was more expecting to filter output lines, rather than mark up input
lines, but so far, I can't think of a problem case where they might be
different. I have a couple of comments/questions about comment text, but no
issues with the code. I look forward to using this in practice.
-------------
Marked as reviewed by jjg (Reviewer).
PR: https://git.openjdk.java.net/jdk/pull/6623