Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(819)

Unified Diff: third_party/WebKit/Source/devtools/front_end/cm_web_modes/htmlmixed.js

Issue 2772343006: DevTools: Roll CodeMirror to 5.25.1 (Closed)
Patch Set: stray space Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/devtools/front_end/cm_web_modes/htmlmixed.js
diff --git a/third_party/WebKit/Source/devtools/front_end/cm_web_modes/htmlmixed.js b/third_party/WebKit/Source/devtools/front_end/cm_web_modes/htmlmixed.js
index d74083ee1a3609f668321f3945c1ad540bb721d9..16b4f139fd400cee86d5e10dda864881cf8b20a3 100644
--- a/third_party/WebKit/Source/devtools/front_end/cm_web_modes/htmlmixed.js
+++ b/third_party/WebKit/Source/devtools/front_end/cm_web_modes/htmlmixed.js
@@ -14,7 +14,7 @@
var defaultTags = {
script: [
["lang", /(javascript|babel)/i, "javascript"],
- ["type", /^(?:text|application)\/(?:x-)?(?:java|ecma)script$|^$/i, "javascript"],
+ ["type", /^(?:text|application)\/(?:x-)?(?:java|ecma)script$|^module$|^$/i, "javascript"],
["type", /./, "text/plain"],
[null, null, "javascript"]
],
@@ -46,7 +46,7 @@
function getAttrValue(text, attr) {
var match = text.match(getAttrRegexp(attr))
- return match ? match[2] : ""
+ return match ? /^\s*(.*?)\s*$/.exec(match[2])[1] : ""
}
function getTagRegexp(tagName, anchored) {

Powered by Google App Engine
This is Rietveld 408576698