From b89a7ee8b956c96a1dcee995ea840feddc5d4b27 Mon Sep 17 00:00:00 2001 From: Pierre Frisch Date: Thu, 22 Dec 2011 07:25:50 -0800 Subject: First commit of Ninja to ninja-internal Signed-off-by: Valerio Virgillito --- js/codemirror/mode/diff/diff.css | 3 ++ js/codemirror/mode/diff/diff.js | 13 +++++ js/codemirror/mode/diff/index.html | 99 ++++++++++++++++++++++++++++++++++++++ 3 files changed, 115 insertions(+) create mode 100644 js/codemirror/mode/diff/diff.css create mode 100644 js/codemirror/mode/diff/diff.js create mode 100644 js/codemirror/mode/diff/index.html (limited to 'js/codemirror/mode/diff') diff --git a/js/codemirror/mode/diff/diff.css b/js/codemirror/mode/diff/diff.css new file mode 100644 index 00000000..16f8d335 --- /dev/null +++ b/js/codemirror/mode/diff/diff.css @@ -0,0 +1,3 @@ +.cm-s-default span.cm-rangeinfo {color: #a0b;} +.cm-s-default span.cm-minus {color: #a22;} +.cm-s-default span.cm-plus {color: #2b2;} diff --git a/js/codemirror/mode/diff/diff.js b/js/codemirror/mode/diff/diff.js new file mode 100644 index 00000000..725bb2c7 --- /dev/null +++ b/js/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 "plus"; + if (ch == "-") return "minus"; + if (ch == "@") return "rangeinfo"; + } + }; +}); + +CodeMirror.defineMIME("text/x-diff", "diff"); diff --git a/js/codemirror/mode/diff/index.html b/js/codemirror/mode/diff/index.html new file mode 100644 index 00000000..2748f2fa --- /dev/null +++ b/js/codemirror/mode/diff/index.html @@ -0,0 +1,99 @@ + + + + CodeMirror 2: Diff mode + + + + + + + + +

CodeMirror 2: Diff mode

+
+ + +

MIME types defined: text/x-diff.

+ + + -- cgit v1.2.3