1
0
forked from aniani/vim
vim/runtime/syntax/testdir/dumps/java_comments_html_00.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

21 lines
2.1 KiB
Plaintext

| +0#0000e05#a8a8a8255@1>/+0&#ffffff0@1| |V|I|M|_|T|E|S|T|_|S|E|T|U|P| |u|n|l|e|t|!| |g+0&#5fd7ff255|:+0&#ffffff0|j|a|v|a|_|n|o|_|t|a|b|_|s|p|a|c|e|_|e|r@1|o|r| |g|:|j|a|v|a|_|i|g|n|o|r|e|_|j+0&#ffd7d7255|a|v|a|d|o|c| +0#0000000#ffffff0
| +0#0000e05#a8a8a8255@1|/+0&#ffffff0@1| |V|I|M|_|T|E|S|T|_|S|E|T|U|P| |u|n|l|e|t|!| |g+0&#5fd7ff255|:+0&#ffffff0|j|a|v|a|_|n|o|_|t|r|a|i|l|_|s|p|a|c|e|_|e|r@1|o|r| +0#0000000&@20
| +0#0000e05#a8a8a8255@1|/+0&#ffffff0@1| |V|I|M|_|T|E|S|T|_|S|E|T|U|P| |l|e|t| |[|g|:|j|a|v|a|_|s|p|a|c|e|_|e|r@1|o|r|s|,|g|:|j|a|v|a|_|c|o|m@1|e|n|t|_|s|t|r|i|n|g|s|]|=|[|1+0#e000002&|,+0#0000e05&|1+0#e000002&|]+0#0000e05&| +0#0000000&
| +0#0000e05#a8a8a8255@1|/+0&#ffffff0@1| |V|I|M|_|T|E|S|T|_|S|E|T|U|P| |l|e|t| |g|:|j|a|v|a|_|i|g|n|o|r|e|_|m|a|r|k|d|o|w|n| |=| |1+0#e000002&| +0#0000000&@24
| +0#0000e05#a8a8a8255@1| +0#0000000#ffffff0@72
| +0#0000e05#a8a8a8255@1| +0#0000000#ffffff0@72
| +0#0000e05#a8a8a8255@1| +0#0000000#ffffff0@72
| +0#0000e05#a8a8a8255@1| +0#0000000#ffffff0@72
| +0#0000e05#a8a8a8255@1| +0#0000000#ffffff0@72
| +0#0000e05#a8a8a8255@1| +0#0000000#ffffff0@72
| +0#0000e05#a8a8a8255@1|/+0&#ffffff0@1| |V|I|M|_|T|E|S|T|_|S|E|T|U|P| |s+0&#ffd7d7255|e|t|l|o|c|a|l| +0&#ffffff0|s|p|e|l@1| |f+0&#ffd7d7255|d|c|=+0&#ffffff0|2+0#e000002&| +0#0000e05&|f+0&#ffd7d7255|d|l|=+0&#ffffff0|6+0#e000002&|4| +0#0000e05&|f+0&#ffd7d7255|d|m|=+0&#ffffff0|s|y|n|t|a|x| |f|e|n| +0#0000000&@12
| +0#0000e05#a8a8a8255@1|/+0&#ffffff0@1| |V|I|M|_|T|E|S|T|_|S|E|T|U|P| |h|i|g|h|l|i|g|h|t| |l|i|n|k| |j+0&#ffd7d7255|a|v|a|C|o|m@1|e|n|t|S|t|a|r|t| +0&#ffffff0|T+0&#ffd7d7255|o|d|o| +0#0000000#ffffff0@18
| +0#0000e05#a8a8a8255@1|/+0&#ffffff0@1| |V|I|M|_|T|E|S|T|_|S|E|T|U|P| |h|i|g|h|l|i|g|h|t| |l|i|n|k| |j+0&#ffd7d7255|a|v|a|C|o|m@1|e|n|t|T|i|t|l|e| +0&#ffffff0|U|n|d|e|r|l|i|n|e|d| +0#0000000&@12
| +0#0000e05#a8a8a8255@1| +0#0000000#ffffff0@72
| +0#0000e05#a8a8a8255@1| +0#0000000#ffffff0@72
| +0#0000e05#a8a8a8255@1| +0#0000000#ffffff0@72
| +0#0000e05#a8a8a8255@1| +0#0000000#ffffff0@72
| +0#0000e05#a8a8a8255@1| +0#0000000#ffffff0@72
| +0#0000e05#a8a8a8255@1| +0#0000000#ffffff0@72
@57|1|,|1| @10|T|o|p|