           { include: 'md_inline' }
         ]
       }
-      {
-        comment: 'Links'
-        match: '!?\\[.*?\\](?:\\(([^\\s\\)]+)(?:\\s+(["\'].*?["\']))?\\)|(\\(\\)))'
+      # Links
+      {
+        match: '!?\\[(.*?)\\](?:\\(([^\\s\\)]+)(?:\\s+(["\'].*?["\']))?\\)|(\\(\\)))'
         name: 'markup.link.documentation.rust'
         captures: {
-          '1': { name: 'markup.link.entity.documentation.rust' }
+          '1': { name: 'markup.link.text.documentation.rust' }
           '2': { name: 'markup.link.entity.documentation.rust' }
-          '3': { name: 'markup.invalid.illegal.documentation.rust' }
-        }
-      }
-      {
-        comment: 'Links'
-        match: '(\\[.*?\\]\\:\\s*([^\\s\\)]+))'
+          '3': { name: 'markup.link.entity.documentation.rust' }
+          '4': { name: 'markup.invalid.illegal.documentation.rust' }
+        }
+      }
+      {
+        match: '(\\[(.*?)\\]\\:\\s*([^\\s\\)]+))'
         captures: {
           '1': { name: 'markup.link.documentation.rust' }
-          '2': { name: 'markup.link.entity.documentation.rust' }
-        }
-      }
+          '2': { name: 'markup.link.text.documentation.rust' }
+          '3': { name: 'markup.link.entity.documentation.rust' }
+        }
+      }
+      # Inline code
       {
         match: '`(?!`).*?`'
         name: 'markup.code.raw.inline.documentation.rust'
       }
+      # Block code
       {
         begin: '(```)(\\w*)'
         end: '//[/!]\\s*(```)'

          }
        ]
      }
      { include: '#md_inline' }
    ]
  }

  
  'markdown': {
    patterns: [
      # Headers
      {
        begin: '(#{1,6})(#*)'
        end: '$'
        name: 'markup.heading.documentation.rust'
