From e70101a9c58f4de5721db2249c8daad8f5883882 Mon Sep 17 00:00:00 2001 From: Brian Grinstead Date: Wed, 14 Oct 2015 11:29:19 -0700 Subject: [PATCH] Bug 1214663 - Make CodeMirror not break when encountering a tag;r=Gijs --- devtools/client/sourceeditor/codemirror/mode/htmlmixed.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/devtools/client/sourceeditor/codemirror/mode/htmlmixed.js b/devtools/client/sourceeditor/codemirror/mode/htmlmixed.js index 670fd62bf1c..21e74f163dd 100755 --- a/devtools/client/sourceeditor/codemirror/mode/htmlmixed.js +++ b/devtools/client/sourceeditor/codemirror/mode/htmlmixed.js @@ -89,8 +89,8 @@ tags.script.unshift(["type", configScript[i].matches, configScript[i].mode]) function html(stream, state) { - var tagName = state.htmlState.tagName; - var tagInfo = tagName && tags[tagName.toLowerCase()]; + var tagName = state.htmlState.tagName && state.htmlState.tagName.toLowerCase(); + var tagInfo = tagName && tags.hasOwnProperty(tagName) && tags[tagName]; var style = htmlMode.token(stream, state.htmlState), modeSpec;