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

Unified Diff: Source/devtools/front_end/cm/htmlmixed.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/htmlembedded.js ('k') | Source/devtools/front_end/cm/javascript.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/devtools/front_end/cm/htmlmixed.js
diff --git a/Source/devtools/front_end/cm/htmlmixed.js b/Source/devtools/front_end/cm/htmlmixed.js
index b59ef37edbe10137d06a795e8b3305098388b745..dc48978eb2e89bff9bed00dac207a4031b813f4b 100644
--- a/Source/devtools/front_end/cm/htmlmixed.js
+++ b/Source/devtools/front_end/cm/htmlmixed.js
@@ -1,5 +1,21 @@
+// 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("../xml/xml"), require("../javascript/javascript"), require("../css/css"));
+ else if (typeof define == "function" && define.amd) // AMD
+ define(["../../lib/codemirror", "../xml/xml", "../javascript/javascript", "../css/css"], mod);
+ else // Plain browser env
+ mod(CodeMirror);
+})(function(CodeMirror) {
+"use strict";
+
CodeMirror.defineMode("htmlmixed", function(config, parserConfig) {
- var htmlMode = CodeMirror.getMode(config, {name: "xml", htmlMode: true});
+ var htmlMode = CodeMirror.getMode(config, {name: "xml",
+ htmlMode: true,
+ multilineTagIndentFactor: parserConfig.multilineTagIndentFactor,
+ multilineTagIndentPastTag: parserConfig.multilineTagIndentPastTag});
var cssMode = CodeMirror.getMode(config, "css");
var scriptTypes = [], scriptTypesConf = parserConfig && parserConfig.scriptTypes;
@@ -93,8 +109,6 @@ CodeMirror.defineMode("htmlmixed", function(config, parserConfig) {
return CodeMirror.Pass;
},
- electricChars: "/{}:",
-
innerMode: function(state) {
return {state: state.localState || state.htmlState, mode: state.localMode || htmlMode};
}
@@ -102,3 +116,5 @@ CodeMirror.defineMode("htmlmixed", function(config, parserConfig) {
}, "xml", "javascript", "css");
CodeMirror.defineMIME("text/html", "htmlmixed");
+
+});
« no previous file with comments | « Source/devtools/front_end/cm/htmlembedded.js ('k') | Source/devtools/front_end/cm/javascript.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698