Skip to content

Commit 1de61c6

Browse files
committed
[jsx mode] Support a 'base' configuration parameter
To configure the inner mode. Closes codemirror#3893
1 parent 934dd97 commit 1de61c6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

mode/jsx/jsx.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,9 @@
2525
context.prev && copyContext(context.prev))
2626
}
2727

28-
CodeMirror.defineMode("jsx", function(config) {
28+
CodeMirror.defineMode("jsx", function(config, modeConfig) {
2929
var xmlMode = CodeMirror.getMode(config, {name: "xml", allowMissing: true, multilineTagIndentPastTag: false})
30-
var jsMode = CodeMirror.getMode(config, "javascript")
30+
var jsMode = CodeMirror.getMode(config, modeConfig && modeConfig.base || "javascript")
3131

3232
function flatXMLIndent(state) {
3333
var tagName = state.tagName

0 commit comments

Comments
 (0)