aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/LocalFilesEditor/codemirror/mode/diff/diff.js
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/LocalFilesEditor/codemirror/mode/diff/diff.js')
-rw-r--r--plugins/LocalFilesEditor/codemirror/mode/diff/diff.js13
1 files changed, 13 insertions, 0 deletions
diff --git a/plugins/LocalFilesEditor/codemirror/mode/diff/diff.js b/plugins/LocalFilesEditor/codemirror/mode/diff/diff.js
new file mode 100644
index 000000000..619d74e2a
--- /dev/null
+++ b/plugins/LocalFilesEditor/codemirror/mode/diff/diff.js
@@ -0,0 +1,13 @@
+CodeMirror.defineMode("diff", function() {
+ return {
+ token: function(stream) {
+ var ch = stream.next();
+ stream.skipToEnd();
+ if (ch == "+") return "diff-plus";
+ if (ch == "-") return "diff-minus";
+ if (ch == "@") return "diff-rangeinfo";
+ }
+ };
+});
+
+CodeMirror.defineMIME("text/x-diff", "diff");