From 3a754133dbc138390503341fd2e9beba3e43aa4b Mon Sep 17 00:00:00 2001 From: Jose Antonio Marquez Date: Fri, 27 Jan 2012 12:05:17 -0800 Subject: Merged old FileIO --- imports/codemirror/mode/diff/diff.css | 3 + imports/codemirror/mode/diff/diff.js | 13 +++++ imports/codemirror/mode/diff/index.html | 99 +++++++++++++++++++++++++++++++++ 3 files changed, 115 insertions(+) create mode 100755 imports/codemirror/mode/diff/diff.css create mode 100755 imports/codemirror/mode/diff/diff.js create mode 100755 imports/codemirror/mode/diff/index.html (limited to 'imports/codemirror/mode/diff') diff --git a/imports/codemirror/mode/diff/diff.css b/imports/codemirror/mode/diff/diff.css new file mode 100755 index 00000000..0e96ab21 --- /dev/null +++ b/imports/codemirror/mode/diff/diff.css @@ -0,0 +1,3 @@ +span.cm-rangeinfo {color: #a0b;} +span.cm-minus {color: red;} +span.cm-plus {color: #2b2;} diff --git a/imports/codemirror/mode/diff/diff.js b/imports/codemirror/mode/diff/diff.js new file mode 100755 index 00000000..725bb2c7 --- /dev/null +++ b/imports/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/imports/codemirror/mode/diff/index.html b/imports/codemirror/mode/diff/index.html new file mode 100755 index 00000000..2540236c --- /dev/null +++ b/imports/codemirror/mode/diff/index.html @@ -0,0 +1,99 @@ + + +
+MIME types defined: text/x-diff
.