Skip to content

Commit fe43be5

Browse files
committed
Auto merge of #15102 - Veykril:markdown-inject, r=Veykril
Remove markdown injection for block comments Closes #15091 I tried making it work but it doesn't seem possible, as the `*` of the closing `*/` sequence gets eaten by the markdown grammar no matter what.
2 parents 6d333e5 + c672ced commit fe43be5

File tree

2 files changed

+4
-17
lines changed

2 files changed

+4
-17
lines changed

editors/code/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1648,7 +1648,7 @@
16481648
"path": "ra_syntax_tree.tmGrammar.json"
16491649
},
16501650
{
1651-
"scopeName": "rustdoc.markdown.injection",
1651+
"scopeName": "source.rustdoc.markdown.injection",
16521652
"path": "rustdoc.markdown.injection.tmGrammar.json",
16531653
"injectTo": [
16541654
"source.rust"

editors/code/rustdoc.markdown.injection.tmGrammar.json

Lines changed: 3 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,17 @@
11
{
2-
"scopeName": "rustdoc.markdown.injection",
2+
"$schema": "https://raw.githubusercontent.com/martinring/tmlanguage/master/tmlanguage.json",
3+
"scopeName": "source.rustdoc.markdown.injection",
34
"injectionSelector": "L:source.rust",
45
"patterns": [
56
{
67
"include": "#doc-comment-line"
7-
},
8-
{
9-
"include": "#doc-comment-block"
108
}
119
],
1210
"repository": {
1311
"doc-comment-line": {
1412
"name": "comment.line.documentation.rust",
1513
"begin": "^\\s*//(/|!)",
16-
"while": "^\\s*//(/|!)",
17-
"contentName": "meta.embedded.block.markdown",
18-
"patterns": [
19-
{
20-
"include": "text.html.markdown"
21-
}
22-
]
23-
},
24-
"doc-comment-block": {
25-
"name": "comment.block.documentation.rust",
26-
"begin": "/\\*(\\*|!)",
27-
"end": "\\s*\\*/",
14+
"end": "$",
2815
"contentName": "meta.embedded.block.markdown",
2916
"patterns": [
3017
{

0 commit comments

Comments
 (0)