Skip to content

Commit

Permalink
[C/C++/ObjC/ObjC++] Fix javadoc comment word wrap (#3855)
Browse files Browse the repository at this point in the history
This commit restores scoping leading asterisks in block comments
`punctuation.definition.comment` to maintain proper word wrapping.

related with e4e5273

Co-authored-by: Benjamin Schaaf <[email protected]>
  • Loading branch information
BenjaminSchaaf and Benjamin Schaaf authored Oct 20, 2023
1 parent 3125fdd commit 2038dad
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions C++/C.sublime-syntax
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,9 @@ contexts:
- match: \*/
scope: punctuation.definition.comment.end.c
pop: true
- match: ^\s*(\*)(?!\**/)
captures:
1: punctuation.definition.comment.c

line-comments:
- match: ^(//) =\s*(.*?)\s*=\s*$\n?
Expand Down
2 changes: 1 addition & 1 deletion C++/syntax_test_c.c
Original file line number Diff line number Diff line change
Expand Up @@ -427,7 +427,7 @@ struct X

/*
*
/* ^ comment.block.c - punctuation */
/* ^ comment.block.c punctuation.definition.comment.c */

/////////////////////////////////////////////
// Preprocessor branches starting blocks
Expand Down

0 comments on commit 2038dad

Please sign in to comment.