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

Unified Diff: Source/devtools/front_end/CodeMirrorTextEditor.js

Issue 18341003: DevTools: [CodeMirror] Add syntax highlighting for some other languages. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebaselined Created 7 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
Index: Source/devtools/front_end/CodeMirrorTextEditor.js
diff --git a/Source/devtools/front_end/CodeMirrorTextEditor.js b/Source/devtools/front_end/CodeMirrorTextEditor.js
index 22b737b794e3845c6c1a03f33d742b2a969e23fd..76dc27d3b142303412ff820d43f3644d9642d67a 100644
--- a/Source/devtools/front_end/CodeMirrorTextEditor.js
+++ b/Source/devtools/front_end/CodeMirrorTextEditor.js
@@ -33,6 +33,7 @@ importScript("cm/css.js");
importScript("cm/javascript.js");
importScript("cm/xml.js");
importScript("cm/htmlmixed.js");
+
importScript("cm/matchbrackets.js");
importScript("cm/closebrackets.js");
importScript("cm/markselection.js");
@@ -40,6 +41,13 @@ importScript("cm/showhint.js");
importScript("cm/comment.js");
importScript("cm/overlay.js");
+importScript("cm/htmlembedded.js");
+importScript("cm/clike.js");
+importScript("cm/coffeescript.js");
+importScript("cm/php.js");
+importScript("cm/python.js");
+importScript("cm/shell.js");
+
/**
* @constructor
* @extends {WebInspector.View}
@@ -555,14 +563,6 @@ WebInspector.CodeMirrorTextEditor.prototype = {
this._disableLongLinesMode();
var showWhitespaces = WebInspector.settings.showWhitespacesInEditor.get();
this._codeMirror.setOption("mode", showWhitespaces ? this._whitespaceOverlayMode(mimeType) : mimeType);
- switch (mimeType) {
- case "text/html": this._codeMirror.setOption("theme", "web-inspector-html"); break;
- case "text/css":
- case "text/x-scss":
- this._codeMirror.setOption("theme", "web-inspector-css");
- break;
- case "text/javascript": this._codeMirror.setOption("theme", "web-inspector-js"); break;
- }
},
/**

Powered by Google App Engine
This is Rietveld 408576698