Skip to content

Commit

Permalink
need a longer test substring for text/x-handlebars-template
Browse files Browse the repository at this point in the history
  • Loading branch information
redmunds authored and marijnh committed Feb 1, 2013
1 parent 5a1976b commit c6ad81e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mode/htmlmixed/htmlmixed.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ CodeMirror.defineMode("htmlmixed", function(config) {
if (/(?:^|\s)tag(?:\s|$)/.test(style) && stream.current() == ">" && state.htmlState.context) {
if (/^script$/i.test(state.htmlState.context.tagName)) {
// Script block: mode to change to depends on type attribute
var scriptType = stream.string.slice(stream.pos - 30, stream.pos).match(/\btype\s*=\s*("[^"]+"|'[^']+'|\S+)[^<]*$/i);
var scriptType = stream.string.slice(stream.pos - 100, stream.pos).match(/\btype\s*=\s*("[^"]+"|'[^']+'|\S+)[^<]*$/i);
scriptType = scriptType && scriptType[1];
if (!scriptType || scriptType.match(/(text|application)\/(java|ecma)script/i)) {
state.token = javascript;
Expand Down

0 comments on commit c6ad81e

Please sign in to comment.