diff --git a/grammars/html.cson b/grammars/html.cson index 59bb33d..1a21e67 100644 --- a/grammars/html.cson +++ b/grammars/html.cson @@ -363,15 +363,13 @@ 'entities': 'patterns': [ { - 'begin': '(&)([a-zA-Z0-9]+|#[0-9]+|#x[0-9a-fA-F]+)' - 'beginCaptures': + 'match': '(&)([a-zA-Z0-9]+|#[0-9]+|#x[0-9a-fA-F]+)(;)' + 'captures': '1': 'name': 'punctuation.definition.entity.begin.html' '2': 'name': 'entity.name.entity.other.html' - 'end': ';' - 'endCaptures': - '0': + '3': 'name': 'punctuation.definition.entity.end.html' 'name': 'constant.character.entity.html' } diff --git a/spec/html-spec.coffee b/spec/html-spec.coffee index b3476a3..ef91223 100644 --- a/spec/html-spec.coffee +++ b/spec/html-spec.coffee @@ -108,7 +108,7 @@ describe 'HTML grammar', -> expect(tokens[0]).toEqual value: '&', scopes: ['text.html.basic', 'invalid.illegal.bad-ampersand.html'] expect(tokens[3]).toEqual value: 'amp', scopes: ['text.html.basic', 'constant.character.entity.html', 'entity.name.entity.other.html'] expect(tokens[4]).toEqual value: ';', scopes: ['text.html.basic', 'constant.character.entity.html', 'punctuation.definition.entity.end.html'] - expect(tokens[7]).toEqual value: 'a', scopes: ['text.html.basic', 'constant.character.entity.html', 'entity.name.entity.other.html'] + expect(tokens[7]).toEqual value: 'a', scopes: ['text.html.basic'] describe "firstLineMatch", -> it "recognises HTML5 doctypes", ->