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

Unified Diff: Source/devtools/front_end/cm/htmlembedded.js

Issue 354833004: DevTools: [CodeMirror] roll CodeMirror to version @e20d175 (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: address comments Created 6 years, 6 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
« no previous file with comments | « Source/devtools/front_end/cm/headlesscodemirror.js ('k') | Source/devtools/front_end/cm/htmlmixed.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/devtools/front_end/cm/htmlembedded.js
diff --git a/Source/devtools/front_end/cm/htmlembedded.js b/Source/devtools/front_end/cm/htmlembedded.js
index ff6dfd2f92e0d58f4c07a9e82aa7e196a4e889a6..e8f7ba803f64fe3d2986f3797dc91e6e0a7eceb4 100644
--- a/Source/devtools/front_end/cm/htmlembedded.js
+++ b/Source/devtools/front_end/cm/htmlembedded.js
@@ -1,3 +1,16 @@
+// CodeMirror, copyright (c) by Marijn Haverbeke and others
+// Distributed under an MIT license: http://codemirror.net/LICENSE
+
+(function(mod) {
+ if (typeof exports == "object" && typeof module == "object") // CommonJS
+ mod(require("../../lib/codemirror"), require("../htmlmixed/htmlmixed"));
+ else if (typeof define == "function" && define.amd) // AMD
+ define(["../../lib/codemirror", "../htmlmixed/htmlmixed"], mod);
+ else // Plain browser env
+ mod(CodeMirror);
+})(function(CodeMirror) {
+"use strict";
+
CodeMirror.defineMode("htmlembedded", function(config, parserConfig) {
//config settings
@@ -58,8 +71,6 @@ CodeMirror.defineMode("htmlembedded", function(config, parserConfig) {
};
},
- electricChars: "/{}:",
-
innerMode: function(state) {
if (state.token == scriptingDispatch) return {state: state.scriptState, mode: scriptingMode};
else return {state: state.htmlState, mode: htmlMixedMode};
@@ -71,3 +82,5 @@ CodeMirror.defineMIME("application/x-ejs", { name: "htmlembedded", scriptingMode
CodeMirror.defineMIME("application/x-aspx", { name: "htmlembedded", scriptingModeSpec:"text/x-csharp"});
CodeMirror.defineMIME("application/x-jsp", { name: "htmlembedded", scriptingModeSpec:"text/x-java"});
CodeMirror.defineMIME("application/x-erb", { name: "htmlembedded", scriptingModeSpec:"ruby"});
+
+});
« no previous file with comments | « Source/devtools/front_end/cm/headlesscodemirror.js ('k') | Source/devtools/front_end/cm/htmlmixed.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698