Skip to content

Commit

Permalink
Fix import order for sublanguages
Browse files Browse the repository at this point in the history
Closes GH-34.
  • Loading branch information
wooorm committed May 7, 2021
1 parent 4ac7fbc commit 0f78ad3
Show file tree
Hide file tree
Showing 82 changed files with 334 additions and 361 deletions.
12 changes: 1 addition & 11 deletions core.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,6 @@ ctx.Prism = {manual: true, disableWorkerMessageHandler: true}
import {h} from 'hastscript'
import {parseEntities} from 'parse-entities'
import Prism from 'prismjs/components/prism-core.js'
import markup from './lang/markup.js'
import css from './lang/css.js'
import clike from './lang/clike.js'
import js from './lang/javascript.js'

restore()

Expand All @@ -47,12 +43,6 @@ refractor.alias = alias
refractor.registered = registered
refractor.listLanguages = listLanguages

// Register bundled grammars.
register(markup)
register(css)
register(clike)
register(js)

refractor.util.encode = encode
refractor.Token.stringify = stringify

Expand All @@ -62,7 +52,7 @@ function register(grammar) {
}

// Do not duplicate registrations.
if (refractor.languages[grammar.displayName] === undefined) {
if (!own.call(refractor.languages, grammar.displayName)) {
grammar(refractor)
}
}
Expand Down

0 comments on commit 0f78ad3

Please sign in to comment.