Don't apply whitespace in emoji matches

This commit is contained in:
Kevin Sawicki
2013-02-10 14:58:43 -08:00
parent b62247a771
commit a908dd5c29
2 changed files with 4 additions and 1 deletions

View File

@@ -29,7 +29,7 @@
'name': 'markup.heading.gfm'
}
{
'match': '\\:[^\\:]+\\:'
'match': '\\:[^\\:\\s]+\\:'
'name': 'variable.emoji.gfm'
}
{

View File

@@ -60,6 +60,9 @@ describe "GitHub Flavored Markdown grammar", ->
expect(tokens[0]).toEqual value: "this is ", scopes: ["source.gfm"]
expect(tokens[1]).toEqual value: ":no_good:", scopes: ["source.gfm", "variable.emoji.gfm"]
{tokens} = grammar.tokenizeLine("this is :no good:")
expect(tokens[0]).toEqual value: "this is :no good:", scopes: ["source.gfm"]
it "tokenizes a ``` code block```", ->
{tokens, ruleStack} = grammar.tokenizeLine("```coffeescript")
expect(tokens[0]).toEqual value: "```coffeescript", scopes: ["source.gfm", "support.gfm"]