Skip to content

Commit c6ad81e

Browse files
redmundsmarijnh
authored andcommitted
need a longer test substring for text/x-handlebars-template
1 parent 5a1976b commit c6ad81e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

mode/htmlmixed/htmlmixed.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ CodeMirror.defineMode("htmlmixed", function(config) {
99
if (/(?:^|\s)tag(?:\s|$)/.test(style) && stream.current() == ">" && state.htmlState.context) {
1010
if (/^script$/i.test(state.htmlState.context.tagName)) {
1111
// Script block: mode to change to depends on type attribute
12-
var scriptType = stream.string.slice(stream.pos - 30, stream.pos).match(/\btype\s*=\s*("[^"]+"|'[^']+'|\S+)[^<]*$/i);
12+
var scriptType = stream.string.slice(stream.pos - 100, stream.pos).match(/\btype\s*=\s*("[^"]+"|'[^']+'|\S+)[^<]*$/i);
1313
scriptType = scriptType && scriptType[1];
1414
if (!scriptType || scriptType.match(/(text|application)\/(java|ecma)script/i)) {
1515
state.token = javascript;

0 commit comments

Comments
 (0)