Skip to content

Commit 0f35444

Browse files
rosmanovmarijnh
authored andcommitted
Fixed breaking attributes in smartymixed mode
Closes issue #2832
1 parent 29be39a commit 0f35444

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

mode/smartymixed/smartymixed.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,11 @@ CodeMirror.defineMode("smartymixed", function(config) {
7777

7878
var parsers = {
7979
html: function(stream, state) {
80-
if (!state.inLiteral && stream.match(regs.htmlHasLeftDelimeter, false) && state.htmlMixedState.htmlState.tagName === null) {
80+
var htmlTagName = state.htmlMixedState.htmlState.context && state.htmlMixedState.htmlState.context.tagName
81+
? state.htmlMixedState.htmlState.context.tagName
82+
: null;
83+
84+
if (!state.inLiteral && stream.match(regs.htmlHasLeftDelimeter, false) && htmlTagName === null) {
8185
state.tokenize = parsers.smarty;
8286
state.localMode = smartyMode;
8387
state.localState = smartyMode.startState(htmlMixedMode.indent(state.htmlMixedState, ""));

0 commit comments

Comments
 (0)