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

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: 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 9643e0b6a8e1d496f54b30f0c5e64b5bc85097df..2fca0534c7ef0cc4bd663aad64f053c992ab0530 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}
@@ -479,12 +487,19 @@ WebInspector.CodeMirrorTextEditor.prototype = {
var showWhitespaces = WebInspector.settings.showWhitespacesInEditor.get();
this._codeMirror.setOption("mode", showWhitespaces ? this._whitespaceOverlayMode(mimeType) : mimeType);
switch (mimeType) {
apavlov 2013/07/01 12:46:48 Remove themes
- case "text/html": this._codeMirror.setOption("theme", "web-inspector-html"); break;
+ 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;
+ case "text/javascript":
+ this._codeMirror.setOption("theme", "web-inspector-js");
+ break;
+ default:
+ this._codeMirror.setOption("theme", "default");
+ break;
}
},

Powered by Google App Engine
This is Rietveld 408576698