From 22dbbd16d86c9b956c20faa3bc66dd8ab66e45c1 Mon Sep 17 00:00:00 2001
From: Dusty Pomerleau <dustypomerleau@users.noreply.github.com>
Date: Tue, 10 Nov 2020 09:54:00 +1100
Subject: fix: prevent `/**/` from matching block doc comments

---
 editors/code/rust.tmGrammar.json | 15 ++++++++++-----
 1 file changed, 10 insertions(+), 5 deletions(-)

(limited to 'editors/code')

diff --git a/editors/code/rust.tmGrammar.json b/editors/code/rust.tmGrammar.json
index b3a10795e..cd4775d27 100644
--- a/editors/code/rust.tmGrammar.json
+++ b/editors/code/rust.tmGrammar.json
@@ -307,9 +307,14 @@
         "block-comments": {
             "patterns": [
                 {
-                    "comment": "block comments",
+                    "comment": "empty block comments",
                     "name": "comment.block.rust",
-                    "begin": "/\\*(?!\\*)",
+                    "match": "/\\*\\*/"
+                },
+                {
+                    "comment": "block documentation comments",
+                    "name": "comment.block.documentation.rust",
+                    "begin": "/\\*\\*",
                     "end": "\\*/",
                     "patterns": [
                         {
@@ -318,9 +323,9 @@
                     ]
                 },
                 {
-                    "comment": "block documentation comments",
-                    "name": "comment.block.documentation.rust",
-                    "begin": "/\\*\\*",
+                    "comment": "block comments",
+                    "name": "comment.block.rust",
+                    "begin": "/\\*(?!\\*)",
                     "end": "\\*/",
                     "patterns": [
                         {
-- 
cgit v1.2.3