From 9f79ed929e4156dc8b5b45161895d70d51cfa5a2 Mon Sep 17 00:00:00 2001 From: Wu Cheng-Han Date: Mon, 28 Nov 2016 01:36:48 +0800 Subject: Update to move custom CodeMirror codebase to our own repo and update webpack build config --- public/vendor/codemirror/mode/troff/index.html | 146 ------------------------- public/vendor/codemirror/mode/troff/troff.js | 84 -------------- 2 files changed, 230 deletions(-) delete mode 100644 public/vendor/codemirror/mode/troff/index.html delete mode 100644 public/vendor/codemirror/mode/troff/troff.js (limited to 'public/vendor/codemirror/mode/troff') diff --git a/public/vendor/codemirror/mode/troff/index.html b/public/vendor/codemirror/mode/troff/index.html deleted file mode 100644 index 7c5a54e5..00000000 --- a/public/vendor/codemirror/mode/troff/index.html +++ /dev/null @@ -1,146 +0,0 @@ - - -CodeMirror: troff mode - - - - - - - - - - -
-

troff

- - - - - - -

MIME types defined: troff.

-
diff --git a/public/vendor/codemirror/mode/troff/troff.js b/public/vendor/codemirror/mode/troff/troff.js deleted file mode 100644 index 86154b6e..00000000 --- a/public/vendor/codemirror/mode/troff/troff.js +++ /dev/null @@ -1,84 +0,0 @@ -// CodeMirror, copyright (c) by Marijn Haverbeke and others -// Distributed under an MIT license: http://codemirror.net/LICENSE - -(function(mod) { - if (typeof exports == "object" && typeof module == "object") - mod(require("../../lib/codemirror")); - else if (typeof define == "function" && define.amd) - define(["../../lib/codemirror"], mod); - else - mod(CodeMirror); -})(function(CodeMirror) { -"use strict"; - -CodeMirror.defineMode('troff', function() { - - var words = {}; - - function tokenBase(stream) { - if (stream.eatSpace()) return null; - - var sol = stream.sol(); - var ch = stream.next(); - - if (ch === '\\') { - if (stream.match('fB') || stream.match('fR') || stream.match('fI') || - stream.match('u') || stream.match('d') || - stream.match('%') || stream.match('&')) { - return 'string'; - } - if (stream.match('m[')) { - stream.skipTo(']'); - stream.next(); - return 'string'; - } - if (stream.match('s+') || stream.match('s-')) { - stream.eatWhile(/[\d-]/); - return 'string'; - } - if (stream.match('\(') || stream.match('*\(')) { - stream.eatWhile(/[\w-]/); - return 'string'; - } - return 'string'; - } - if (sol && (ch === '.' || ch === '\'')) { - if (stream.eat('\\') && stream.eat('\"')) { - stream.skipToEnd(); - return 'comment'; - } - } - if (sol && ch === '.') { - if (stream.match('B ') || stream.match('I ') || stream.match('R ')) { - return 'attribute'; - } - if (stream.match('TH ') || stream.match('SH ') || stream.match('SS ') || stream.match('HP ')) { - stream.skipToEnd(); - return 'quote'; - } - if ((stream.match(/[A-Z]/) && stream.match(/[A-Z]/)) || (stream.match(/[a-z]/) && stream.match(/[a-z]/))) { - return 'attribute'; - } - } - stream.eatWhile(/[\w-]/); - var cur = stream.current(); - return words.hasOwnProperty(cur) ? words[cur] : null; - } - - function tokenize(stream, state) { - return (state.tokens[0] || tokenBase) (stream, state); - }; - - return { - startState: function() {return {tokens:[]};}, - token: function(stream, state) { - return tokenize(stream, state); - } - }; -}); - -CodeMirror.defineMIME('text/troff', 'troff'); -CodeMirror.defineMIME('text/x-troff', 'troff'); -CodeMirror.defineMIME('application/x-troff', 'troff'); - -}); -- cgit v1.2.3