From 115678bf0bedb35afc8a9d1d931f2c572db087a1 Mon Sep 17 00:00:00 2001 From: Wliu <50Wliu@users.noreply.github.com> Date: Thu, 17 Nov 2016 15:36:52 -0500 Subject: [PATCH] Revert "Remove custom JavaScript captures" --- grammars/html.cson | 15 +++++++++++++++ spec/html-spec.coffee | 15 --------------- 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/grammars/html.cson b/grammars/html.cson index 23d2db1..1a21e67 100644 --- a/grammars/html.cson +++ b/grammars/html.cson @@ -251,6 +251,21 @@ 'name': 'entity.name.tag.script.html' 'end': '( expect(lines[1][0]).toEqual value: ' ', scopes: ['text.html.basic', 'source.js.embedded.html'] expect(lines[1][1]).toEqual value: 'var', scopes: ['text.html.basic', 'source.js.embedded.html', 'storage.type.var.js'] - it 'detects tags even if they would otherwise be valid JavaScript', -> - # This spec relies on language-javascript's "embedded javascript.cson", so if it fails, look there - lines = grammar.tokenizeLines ''' - '; - var shouldntbematched; - ''' - - expect(lines[1][1]).toEqual value: 'var', scopes: ['text.html.basic', 'source.js.embedded.html', 'storage.type.var.js'] - expect(lines[1][5]).toEqual value: "'", scopes: ['text.html.basic', 'source.js.embedded.html', 'string.quoted.single.js', 'punctuation.definition.string.begin.js'] - expect(lines[1][6]).toEqual value: 'test', scopes: ['text.html.basic', 'source.js.embedded.html', 'string.quoted.single.js'] - expect(lines[1][7]).toEqual value: ' it "tokenizes -- as an error", -> {tokens} = grammar.tokenizeLine ''