     beginCaptures:
       0:
         name: 'string.other.math.inline.begin.latex'
-    end: '(\\$)|(\\\\\\))'
+    end: '(\\$)|(\\\\\\))|(?=\\})'
     endCaptures:
       0:
         name: 'string.other.math.inline.end.latex'

      { include: '#makeatsomething' }
      { include: '#verbatim' }
      { include: '#item' }
      { include: '#texPrimitives' }
      { include: '#controlSymbol' }
      { include: '#controlWord' }

    match: '&'
  }
  openCurlyBracketMeta: {
    contentName: 'meta.group.braces.latex'
    begin: '{'
    beginCaptures:
      0:
        name: 'punctuation.definition.group.latex'
    end: '}'
    endCaptures:
      0:
        name: 'punctuation.definition.group.latex'
    patterns: [
      comment: 'Optimisation good to implement here. Rework commentMeta to be a more general check for escaped characters and comments'
      {
