Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 15 additions & 4 deletions syntaxes/rust.tmLanguage.json
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,14 @@
{
"comment": "documentation comments",
"name": "comment.line.documentation.rust",
"match": "^\\s*///.*"
"begin": "^\\s*//(/|!)",
"while": "^\\s*//(/|!)",
"contentName": "meta.embedded.block.markdown",
"patterns": [
{
"include": "text.html.markdown"
}
]
},
{
"comment": "line comments",
Expand All @@ -317,11 +324,15 @@
{
"comment": "block documentation comments",
"name": "comment.block.documentation.rust",
"begin": "/\\*\\*",
"end": "\\*/",
"begin": "/\\*(\\*|!)",
"end": "\\s*\\*/",
"contentName": "meta.embedded.block.markdown",
"patterns": [
{
"include": "#block-comments"
},
{
"include": "text.html.markdown"
}
]
},
Expand Down Expand Up @@ -1165,4 +1176,4 @@
]
}
}
}
}
12 changes: 9 additions & 3 deletions syntaxes/rust.tmLanguage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,11 @@ repository:
-
comment: documentation comments
name: comment.line.documentation.rust
match: ^\s*///.*
begin: ^\\s*//(/|!)
while: ^\\s*//(/|!)
contentName: meta.embedded.block.markdown
patterns:
- include: text.html.markdown
-
comment: line comments
name: comment.line.double-slash.rust
Expand All @@ -174,10 +178,12 @@ repository:
-
comment: block documentation comments
name: comment.block.documentation.rust
begin: /\*\*
end: \*/
begin: /\\*(\\*|!)
end: \\s*\\*/
contentName: meta.embedded.block.markdown
patterns:
- include: '#block-comments'
- include: text.html.markdown
-
comment: block comments
name: comment.block.rust
Expand Down