RFR: 8277026: Remove blank lines remaining from snippet markup
Pavel Rappo
prappo at openjdk.java.net
Tue Nov 30 19:55:18 UTC 2021
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
-------------
Commit messages:
- Better test and clean up
- Initial commit for 8277026
Changes: https://git.openjdk.java.net/jdk/pull/6623/files
Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=6623&range=00
Issue: https://bugs.openjdk.java.net/browse/JDK-8277026
Stats: 251 lines in 7 files changed: 240 ins; 2 del; 9 mod
Patch: https://git.openjdk.java.net/jdk/pull/6623.diff
Fetch: git fetch https://git.openjdk.java.net/jdk pull/6623/head:pull/6623
PR: https://git.openjdk.java.net/jdk/pull/6623
More information about the javadoc-dev
mailing list