vim/runtime/syntax/testdir/dumps/java_comments_html_06.dump
Aliaksei Budavei 85f054aa3f
runtime(java): Recognise the CommonMark form (///) of Javadoc comments
Complement "g:java_ignore_javadoc" with "g:java_ignore_html"
and "g:java_ignore_markdown" to allow selectively disabling
the recognition of HTML and CommonMark respectively.

(Note that this is not a preview feature.)

======================== LIMITATION ========================

According to the syntactical details of JEP 467:

> Any leading whitespace and the three initial / characters
> are removed from each line.
>
> The lines are shifted left, by removing leading whitespace
> characters, until the non-blank line with the least
> leading whitespace has no remaining leading whitespace.
>
> Additional leading whitespace and any trailing whitespace
> in each line is preserved, because it may be significant.

the following example:
------------------------------------------------------------
///    A summary sentence.
///     A list:
///      - Item A.
///     - Item B.
///
///     Some code span, starting here `
///      1 + 2 ` and ending at the previous \`.
------------------------------------------------------------

should be interpreted as if it were written thus:
------------------------------------------------------------
///A summary sentence.
/// A list:
///  - Item A.
/// - Item B.
///
/// Some code span, starting here `
///  1 + 2 ` and ending at the previous \`.
------------------------------------------------------------

Since automatic line rewriting will not be pursued, parts of
such comments having significant whitespace may be ‘wrongly’
highlighted.  For convenience, a &fex function is defined to
‘correct’ it: g:javaformat#RemoveCommonMarkdownWhitespace()
(:help ft-java-plugin).

References:
https://openjdk.org/jeps/467
https://spec.commonmark.org/0.31.2

closes: #15740

Co-authored-by: Tim Pope <code@tpope.net>
Signed-off-by: Aliaksei Budavei <0x000c70@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-09-30 19:40:04 +02:00

20 lines
3.7 KiB
Text

|-+0#0000e05#a8a8a8255| | +0#0000000#ffffff0@3|/+0#0000e05&|*@1| +8#e000e06&|T|h|e| |m|e|t|h|o|d| |{+0&&|@|c|o|d|e| |m|a|i|n|}| +8&&|m|u|s|t| |b|e| |d|e|c|l|a|r|e|d| |{+0&&|@|c|o|d|e| |p|u|b|l|i|c|}|,+8&&| |{+0&&|@|c|o|d|e| +0#0000000&@1
||+0#0000e05#a8a8a8255| | +0#e000e06#ffffff0@4|*| |s|t|a|t|i|c|}|,+8&&| |a|n|d| |{+0&&|@|c|o|d|e| |v|o|i|d|}|.+8&&| +0#0000e05&@1|I|t| |m|u|s|t| |s|p|e|c|i|f|y| |a| |f|o|r|m|a|l| |p|a|r|a|m|e|t|e|r| +0#0000000&@3
||+0#0000e05#a8a8a8255| | +0&#ffffff0@4|*| |w|h|o|s|e| |d|e|c|l|a|r|e|d| |t|y|p|e| |i|s| |a|r@1|a|y| |o|f| |{+0#e000e06&|@|l|i|n|k| |S|t|r|i|n|g|}|.+0#0000e05&| @1|T|h|e|r|e|f|o|r|e|,| +0#0000000&@6
||+0#0000e05#a8a8a8255| | +0&#ffffff0@4|*| |<+0#00e0e07&|e+0#af5f00255&|m|>+0#00e0e07&|e+0#0000000&|i|t|h|e|r|<+0#00e0e07&|/|e+0#af5f00255&|m|>+0#00e0e07&| +0#0000e05&|o|f| |t|h|e| |f|o|l@1|o|w|i|n|g| |d|e|c|l|a|r|a|t|i|o|n|s| |i|s| |a|c@1|e|p|t|a|b|l|e|:| +0#0000000&@5
||+0#0000e05#a8a8a8255| | +0&#ffffff0@4|*| +0#ffffff16#ff404010| +0#0000e05#ffffff0|{+0#e000e06&|@|s|n|i|p@1|e|t| |l+0#00e0003&|a|n|g|=+0#e000e06&|"+0#e000002&|j|a|v|a|"|:+0#e000e06&| +0#0000000&@42
||+0#0000e05#a8a8a8255| | +0#e000e06#ffffff0@4>*| |/@1| |@+0#0000000&|h|i|g|h|l|i|g|h|t| +0#e000e06&|s+0#00e0003&|u|b|s|t|r|i|n|g|=+0#e000e06&|"+0#e000002&|m|a|i|n|"| +0#e000e06&|t+0#00e0003&|y|p|e|=+0#e000e06&|"+0#e000002&|i|t|a|l|i|c|"|:+0#e000e06&| +0#0000000&@20
||+0#0000e05#a8a8a8255| | +0#e000e06#ffffff0@4|*| |p|u|b|l|i|c| |s|t|a|t|i|c| |v|o|i|d| |m|a|i|n|(|S|t|r|i|n|g|[|]| |a|r|g|s|)| |{| |}| +0#0000000&@23
||+0#0000e05#a8a8a8255| | +0#e000e06#ffffff0@4|*| |}|<+0#00e0e07&|b+0#af5f00255&|r| +0#00e0e07&|/|>|<|p+0#af5f00255&|r|e| +0#00e0e07&|c+0#00e0003&|l|a|s@1|=+0#00e0e07&|"+0#e000002&|s|n|i|p@1|e|t|"|>+0#00e0e07&| +0#0000000&@37
||+0#0000e05#a8a8a8255| | +0&#ffffff0@4|*|{+0#e000e06&|@|c|o|d|e| |p|u|b|l|i|c| |s|t|a|t|i|c| |v|o|i|d| |m|a|i|n|(|S|t|r|i|n|g|.@2| |a|r|g|s|)| |{| |}@1|<+0#00e0e07&|/|p+0#af5f00255&|r|e|>+0#00e0e07&| +0#0000000&@9
||+0#0000e05#a8a8a8255| | +0&#ffffff0@4|*| +0#0000000&@66
||+0#0000e05#a8a8a8255| | +0&#ffffff0@4|*| |@+0#e000e06&|p|a|r|a|m| |a+0#00e0e07&|r|g|s| +0#0000e05&|o|p|t|i|o|n|a|l| |c+0&#ffd7d7255|o|m@1|a|n|d|e|-+0&#ffffff0|l|i|n|e| |a|r|g|u|m|e|n|t|s| +0#ffffff16#ff404010| +0#0000000#ffffff0@20
||+0#0000e05#a8a8a8255| | +0&#ffffff0@4|*| |@|j+0&#ffd7d7255|l|s| +0&#ffffff0|1|2|.|1|.|4| |I|n|v|o|k|e| |{+0#e000e06&|@|c|o|d|e| |T|e|s|t|.|m|a|i|n|}| +0#0000e05&|*|/| +0#0000000&@26
| +0#0000e05#a8a8a8255@1| +0#0000000#ffffff0@3|/+0#0000e05&@1| |@+0#0000000&|s|t|a|r|t| +0#0000e05&|r+0#00e0003&|e|g|i|o|n| +0#0000e05&|=| |m+0#e000002&|a|i|n| +0#ffffff16#ff404010@4| +0#0000000#ffffff0@40
| +0#0000e05#a8a8a8255@1| +0#0000000#ffffff0@3|/+0#0000e05&@1| |@+0#0000000&|l|i|n|k| +0#0000e05&|s+0#00e0003&|u|b|s|t|r|i|n|g| +0#0000e05&|=| |'+0#e000002&|S|t|r|i|n|g|'| +0#0000e05&|t+0#00e0003&|a|r|g|e|t| +0#0000e05&|=| |'+0#e000002&|j|a|v|a|.|l|a|n|g|.|S|t|r|i|n|g|'| +0#0000e05&|:| +0#0000000&@9
| +0#0000e05#a8a8a8255@1| +0#0000000#ffffff0@3|p+0#00e0003&|u|b|l|i|c| +0#0000000&|s+0#00e0003&|t|a|t|i|c| +0#0000000&|v+0#00e0003&|o|i|d| +0#0000000&|m|a|i|n|(|S|t|r|i|n|g|[|]| |a|r|g|s|)| |{| |}| @26
| +0#0000e05#a8a8a8255@1| +0#0000000#ffffff0@3|/+0#0000e05&@1| |@+0#0000000&|e|n|d| +0#ffffff16#ff404010| +0#0000000#ffffff0@60
| +0#0000e05#a8a8a8255@1| +0#0000000#ffffff0@72
|-+0#0000e05#a8a8a8255| | +0#0000000#ffffff0@3|/+0#0000e05&|*@1| |{+8#e000e06&|@+0&&|r|e|t|u|r|n| +8&&|a|n| |e|m|p|t|y| |s|t|r|i|n|g|}| +0#0000000&@39
||+0#0000e05#a8a8a8255| | +0&#ffffff0@4|*| |@+0#e000e06&|s|e@1| |<+0#00e0e07&|a+0#af5f00255&| +0#00e0e07&|h+0#00e0003&|r|e|f|=+0#00e0e07&|"+0#e000002&|h|t@1|p|s|:|/@1|d|o|c|s|.|o|r|a|c|l|e|.|c|o|m|/|j|a|v|a|s|e|/|s|p|e|c|s|/|j|l|s|/|s|e|2|1|/|h|t|m|@+0#4040ff13&@2
| +0#0000000&@56|1|0|9|,|3|-|6| @6|9|1|%|