about summary refs log tree commit diff
diff options
context:
space:
mode:
authorLukas Wirth <lukastw97@gmail.com>2023-06-21 19:08:00 +0200
committerLukas Wirth <lukastw97@gmail.com>2023-06-21 19:08:00 +0200
commitc672cedeba46b7e056105f6d035245eba8de94b4 (patch)
tree8acb86eedced3f2a5763e32838908815f23ba54f
parent6d333e587d0563355d865babec9de44365f55fb5 (diff)
downloadrust-c672cedeba46b7e056105f6d035245eba8de94b4.tar.gz
rust-c672cedeba46b7e056105f6d035245eba8de94b4.zip
Remove markdown injection for block comments
-rw-r--r--editors/code/package.json2
-rw-r--r--editors/code/rustdoc.markdown.injection.tmGrammar.json19
2 files changed, 4 insertions, 17 deletions
diff --git a/editors/code/package.json b/editors/code/package.json
index ee1f832d323..240ec1f836e 100644
--- a/editors/code/package.json
+++ b/editors/code/package.json
@@ -1648,7 +1648,7 @@
                 "path": "ra_syntax_tree.tmGrammar.json"
             },
             {
-                "scopeName": "rustdoc.markdown.injection",
+                "scopeName": "source.rustdoc.markdown.injection",
                 "path": "rustdoc.markdown.injection.tmGrammar.json",
                 "injectTo": [
                     "source.rust"
diff --git a/editors/code/rustdoc.markdown.injection.tmGrammar.json b/editors/code/rustdoc.markdown.injection.tmGrammar.json
index 3ee49bff31e..b12e62e1b6a 100644
--- a/editors/code/rustdoc.markdown.injection.tmGrammar.json
+++ b/editors/code/rustdoc.markdown.injection.tmGrammar.json
@@ -1,30 +1,17 @@
 {
-    "scopeName": "rustdoc.markdown.injection",
+    "$schema": "https://raw.githubusercontent.com/martinring/tmlanguage/master/tmlanguage.json",
+    "scopeName": "source.rustdoc.markdown.injection",
     "injectionSelector": "L:source.rust",
     "patterns": [
         {
             "include": "#doc-comment-line"
-        },
-        {
-            "include": "#doc-comment-block"
         }
     ],
     "repository": {
         "doc-comment-line": {
             "name": "comment.line.documentation.rust",
             "begin": "^\\s*//(/|!)",
-            "while": "^\\s*//(/|!)",
-            "contentName": "meta.embedded.block.markdown",
-            "patterns": [
-                {
-                    "include": "text.html.markdown"
-                }
-            ]
-        },
-        "doc-comment-block": {
-            "name": "comment.block.documentation.rust",
-            "begin": "/\\*(\\*|!)",
-            "end": "\\s*\\*/",
+            "end": "$",
             "contentName": "meta.embedded.block.markdown",
             "patterns": [
                 {