Add raw scope to entire `` `` block

This commit is contained in:
Kevin Sawicki
2013-02-12 18:34:01 -08:00
parent b2a9208acf
commit 7d7af86c90
3 changed files with 4 additions and 6 deletions

View File

@@ -51,10 +51,7 @@
'end': '^```$'
'endCaptures':
'0': 'name': 'support.gfm'
'patterns': [
'match': '.*'
'name': 'markup.raw.gfm'
]
'name': 'markup.raw.gfm'
}
{
'match': '`[^`]+`'

View File

@@ -85,11 +85,11 @@ describe "GitHub Flavored Markdown grammar", ->
it "tokenizes a ``` code block```", ->
{tokens, ruleStack} = grammar.tokenizeLine("```coffeescript")
expect(tokens[0]).toEqual value: "```coffeescript", scopes: ["source.gfm", "support.gfm"]
expect(tokens[0]).toEqual value: "```coffeescript", scopes: ["source.gfm", "markup.raw.gfm", "support.gfm"]
{tokens, ruleStack} = grammar.tokenizeLine("-> 'hello'", ruleStack)
expect(tokens[0]).toEqual value: "-> 'hello'", scopes: ["source.gfm", "markup.raw.gfm"]
{tokens} = grammar.tokenizeLine("```", ruleStack)
expect(tokens[0]).toEqual value: "```", scopes: ["source.gfm", "support.gfm"]
expect(tokens[0]).toEqual value: "```", scopes: ["source.gfm", "markup.raw.gfm", "support.gfm"]
it "tokenizes inline `code` blocks", ->
{tokens} = grammar.tokenizeLine("`this` is `code`")