File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -50,7 +50,15 @@ CodeMirror.multiplexingMode = function(outer /*, others */) {
5050 if ( found == stream . pos ) {
5151 if ( ! other . parseDelimiters ) stream . match ( other . open ) ;
5252 state . innerActive = other ;
53- state . inner = CodeMirror . startState ( other . mode , outer . indent ? outer . indent ( state . outer , "" ) : 0 ) ;
53+
54+ // Get the outer indent, making sure to handle CodeMirror.Pass
55+ var outerIndent = 0 ;
56+ if ( outer . indent ) {
57+ var possibleOuterIndent = outer . indent ( state . outer , "" ) ;
58+ if ( possibleOuterIndent !== CodeMirror . Pass ) outerIndent = possibleOuterIndent ;
59+ }
60+
61+ state . inner = CodeMirror . startState ( other . mode , outerIndent ) ;
5462 return other . delimStyle && ( other . delimStyle + " " + other . delimStyle + "-open" ) ;
5563 } else if ( found != - 1 && found < cutOff ) {
5664 cutOff = found ;
You can’t perform that action at this time.
0 commit comments