Skip to content

Commit

Permalink
clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
joshgoebel committed Dec 13, 2019
1 parent b0fe526 commit ea6a183
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/languages/javascript.js
Expand Up @@ -6,6 +6,7 @@ Website: https://developer.mozilla.org/en-US/docs/Web/JavaScript
*/

function(hljs) {
var SELF_CLOSING_TAG = /<[A-Za-z0-9\\._:-]+\s*\/>/;
var IDENT_RE = '[A-Za-z$_][0-9A-Za-z$_]*';
var KEYWORDS = {
keyword:
Expand Down Expand Up @@ -189,16 +190,15 @@ function(hljs) {
},
{ // E4X / JSX
className: 'jsx',
begin: /<[A-Za-z0-9\\._:-]+/, end: /(\/[A-Za-z0-9\\._:-]+\/?)>/,
subLanguage: 'xml',
begin: /<[A-Za-z0-9\\._:-]+/, end: /(\/[A-Za-z0-9\\._:-]+)>/,
subLanguage: 'xmlx',
contains: [
// self-closing tag
{ begin: /<[A-Za-z0-9\\._:-]+\s*\/>/, skip: true },
{ begin: SELF_CLOSING_TAG, skip: true },
// manually closed tag
{
begin: /<[A-Za-z0-9\\._:-]+/, end: /(\/[A-Za-z0-9\\._:-]+\/?)>/, skip: true,
begin: /<[A-Za-z0-9\\._:-]+/, end: /(\/[A-Za-z0-9\\._:-]+)>/, skip: true,
contains: [
{ begin: /<[A-Za-z0-9\\._:-]+\s*\/>/, skip: true },
{ begin: SELF_CLOSING_TAG, skip: true },
'self'
]
},
Expand Down

0 comments on commit ea6a183

Please sign in to comment.