diff --git a/grammars/c#.cson b/grammars/c#.cson index b44057c..5ae7861 100644 --- a/grammars/c#.cson +++ b/grammars/c#.cson @@ -536,10 +536,10 @@ repository: patterns: [ { begin: "///" - captures: + beginCaptures: "0": name: "punctuation.definition.comment.cs" - end: "$\\n?" + end: "$" name: "comment.block.documentation.cs" patterns: [ { @@ -549,18 +549,21 @@ repository: } { begin: "/\\*" - captures: + beginCaptures: "0": name: "punctuation.definition.comment.cs" end: "\\*/" + endCaptures: + "0": + name: "punctuation.definition.comment.cs" name: "comment.block.cs" } { begin: "//" - captures: + beginCaptures: "1": name: "punctuation.definition.comment.cs" - end: "$\\n?" + end: "$" name: "comment.line.double-slash.cs" } ] diff --git a/spec/grammar-spec.coffee b/spec/grammar-spec.coffee index 74da474..74c55d4 100644 --- a/spec/grammar-spec.coffee +++ b/spec/grammar-spec.coffee @@ -166,10 +166,10 @@ describe "Language C# package", -> else expect(token[0].value).toBe(directive) - expect(token[token.length - 3].value).toBe('//') - expect(token[token.length - 3].scopes).toContain('comment.line.double-slash.cs') - expect(token[token.length - 2].value).toBe(' A line comment') + expect(token[token.length - 2].value).toBe('//') expect(token[token.length - 2].scopes).toContain('comment.line.double-slash.cs') + expect(token[token.length - 1].value).toBe(' A line comment') + expect(token[token.length - 1].scopes).toContain('comment.line.double-slash.cs') describe "C# Script grammar", -> it "parses the grammar", ->