Skip to content
Permalink
Browse files

modify jsx lexer to handle tags with periods

  • Loading branch information...
douglas-larocca authored and alecthomas committed Apr 3, 2019
1 parent 38460d1 commit 26f03cb449836d2e8afaab154853eed0bf1223ee
Showing with 2 additions and 2 deletions.
  1. +2 −2 lexers/j/jsx.go
@@ -8,8 +8,8 @@ import (
var JSXRules = func() Rules {
rules := JavascriptRules.Clone()
rules["jsx"] = []Rule{
{`(<)([\w_\-]+)`, ByGroups(Punctuation, NameTag), Push("tag")},
{`(<)(/)(\s*)([\w_\-]+)(\s*)(>)`, ByGroups(Punctuation, Punctuation, Text, NameTag, Text, Punctuation), nil},
{`(<)([\w\._\-]+)`, ByGroups(Punctuation, NameTag), Push("tag")},
{`(<)(/)(\s*)([\w\._\-]+)(\s*)(>)`, ByGroups(Punctuation, Punctuation, Text, NameTag, Text, Punctuation), nil},
}
rules["tag"] = []Rule{
{`\s+`, Text, nil},

0 comments on commit 26f03cb

Please sign in to comment.
You can’t perform that action at this time.