diff --git a/src/language/HTMLUtils.js b/src/language/HTMLUtils.js index 9e2992009b2..ff9cad16c64 100644 --- a/src/language/HTMLUtils.js +++ b/src/language/HTMLUtils.js @@ -289,6 +289,11 @@ define(function (require, exports, module) { tagInfo, tokenType; + // check if this is inside a style block. + if (editor.getModeForSelection() !== "html") { + return createTagInfo(); + } + //check and see where we are in the tag if (ctx.token.string.length > 0 && ctx.token.string.trim().length === 0) {