| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,73 @@ | ||
| // 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") // CommonJS | ||
| mod(require("../../lib/codemirror")); | ||
| else if (typeof define == "function" && define.amd) // AMD | ||
| define(["../../lib/codemirror"], mod); | ||
| else // Plain browser env | ||
| mod(CodeMirror); | ||
| })(function(CodeMirror) { | ||
| "use strict"; | ||
|
|
||
| function errorIfNotEmpty(stream) { | ||
| var nonWS = stream.match(/^\s*\S/); | ||
| stream.skipToEnd(); | ||
| return nonWS ? "error" : null; | ||
| } | ||
|
|
||
| CodeMirror.defineMode("asciiarmor", function() { | ||
| return { | ||
| token: function(stream, state) { | ||
| var m; | ||
| if (state.state == "top") { | ||
| if (stream.sol() && (m = stream.match(/^-----BEGIN (.*)?-----\s*$/))) { | ||
| state.state = "headers"; | ||
| state.type = m[1]; | ||
| return "tag"; | ||
| } | ||
| return errorIfNotEmpty(stream); | ||
| } else if (state.state == "headers") { | ||
| if (stream.sol() && stream.match(/^\w+:/)) { | ||
| state.state = "header"; | ||
| return "atom"; | ||
| } else { | ||
| var result = errorIfNotEmpty(stream); | ||
| if (result) state.state = "body"; | ||
| return result; | ||
| } | ||
| } else if (state.state == "header") { | ||
| stream.skipToEnd(); | ||
| state.state = "headers"; | ||
| return "string"; | ||
| } else if (state.state == "body") { | ||
| if (stream.sol() && (m = stream.match(/^-----END (.*)?-----\s*$/))) { | ||
| if (m[1] != state.type) return "error"; | ||
| state.state = "end"; | ||
| return "tag"; | ||
| } else { | ||
| if (stream.eatWhile(/[A-Za-z0-9+\/=]/)) { | ||
| return null; | ||
| } else { | ||
| stream.next(); | ||
| return "error"; | ||
| } | ||
| } | ||
| } else if (state.state == "end") { | ||
| return errorIfNotEmpty(stream); | ||
| } | ||
| }, | ||
| blankLine: function(state) { | ||
| if (state.state == "headers") state.state = "body"; | ||
| }, | ||
| startState: function() { | ||
| return {state: "top", type: null}; | ||
| } | ||
| }; | ||
| }); | ||
|
|
||
| CodeMirror.defineMIME("application/pgp", "asciiarmor"); | ||
| CodeMirror.defineMIME("application/pgp-keys", "asciiarmor"); | ||
| CodeMirror.defineMIME("application/pgp-signature", "asciiarmor"); | ||
| }); |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,46 @@ | ||
| <!doctype html> | ||
|
|
||
| <title>CodeMirror: ASCII Armor (PGP) mode</title> | ||
| <meta charset="utf-8"/> | ||
| <link rel=stylesheet href="../../doc/docs.css"> | ||
|
|
||
| <link rel="stylesheet" href="../../lib/codemirror.css"> | ||
| <script src="../../lib/codemirror.js"></script> | ||
| <script src="asciiarmor.js"></script> | ||
| <style>.CodeMirror {background: #f8f8f8;}</style> | ||
| <div id=nav> | ||
| <a href="http://codemirror.net"><h1>CodeMirror</h1><img id=logo src="../../doc/logo.png"></a> | ||
|
|
||
| <ul> | ||
| <li><a href="../../index.html">Home</a> | ||
| <li><a href="../../doc/manual.html">Manual</a> | ||
| <li><a href="https://github.com/codemirror/codemirror">Code</a> | ||
| </ul> | ||
| <ul> | ||
| <li><a href="../index.html">Language modes</a> | ||
| <li><a class=active href="#">ASCII Armor</a> | ||
| </ul> | ||
| </div> | ||
|
|
||
| <article> | ||
| <h2>ASCII Armor (PGP) mode</h2> | ||
| <form><textarea id="code" name="code"> | ||
| -----BEGIN PGP MESSAGE----- | ||
| Version: OpenPrivacy 0.99 | ||
|
|
||
| yDgBO22WxBHv7O8X7O/jygAEzol56iUKiXmV+XmpCtmpqQUKiQrFqclFqUDBovzS | ||
| vBSFjNSiVHsuAA== | ||
| =njUN | ||
| -----END PGP MESSAGE----- | ||
| </textarea></form> | ||
|
|
||
| <script> | ||
| var editor = CodeMirror.fromTextArea(document.getElementById("code"), { | ||
| lineNumbers: true | ||
| }); | ||
| </script> | ||
|
|
||
| <p><strong>MIME types | ||
| defined:</strong> <code>application/pgp</code>, <code>application/pgp-keys</code>, <code>application/pgp-signature</code></p> | ||
|
|
||
| </article> |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,97 @@ | ||
| // 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("cmake", function () { | ||
| var variable_regex = /({)?[a-zA-Z0-9_]+(})?/; | ||
|
|
||
| function tokenString(stream, state) { | ||
| var current, prev, found_var = false; | ||
| while (!stream.eol() && (current = stream.next()) != state.pending) { | ||
| if (current === '$' && prev != '\\' && state.pending == '"') { | ||
| found_var = true; | ||
| break; | ||
| } | ||
| prev = current; | ||
| } | ||
| if (found_var) { | ||
| stream.backUp(1); | ||
| } | ||
| if (current == state.pending) { | ||
| state.continueString = false; | ||
| } else { | ||
| state.continueString = true; | ||
| } | ||
| return "string"; | ||
| } | ||
|
|
||
| function tokenize(stream, state) { | ||
| var ch = stream.next(); | ||
|
|
||
| // Have we found a variable? | ||
| if (ch === '$') { | ||
| if (stream.match(variable_regex)) { | ||
| return 'variable-2'; | ||
| } | ||
| return 'variable'; | ||
| } | ||
| // Should we still be looking for the end of a string? | ||
| if (state.continueString) { | ||
| // If so, go through the loop again | ||
| stream.backUp(1); | ||
| return tokenString(stream, state); | ||
| } | ||
| // Do we just have a function on our hands? | ||
| // In 'cmake_minimum_required (VERSION 2.8.8)', 'cmake_minimum_required' is matched | ||
| if (stream.match(/(\s+)?\w+\(/) || stream.match(/(\s+)?\w+\ \(/)) { | ||
| stream.backUp(1); | ||
| return 'def'; | ||
| } | ||
| if (ch == "#") { | ||
| stream.skipToEnd(); | ||
| return "comment"; | ||
| } | ||
| // Have we found a string? | ||
| if (ch == "'" || ch == '"') { | ||
| // Store the type (single or double) | ||
| state.pending = ch; | ||
| // Perform the looping function to find the end | ||
| return tokenString(stream, state); | ||
| } | ||
| if (ch == '(' || ch == ')') { | ||
| return 'bracket'; | ||
| } | ||
| if (ch.match(/[0-9]/)) { | ||
| return 'number'; | ||
| } | ||
| stream.eatWhile(/[\w-]/); | ||
| return null; | ||
| } | ||
| return { | ||
| startState: function () { | ||
| var state = {}; | ||
| state.inDefinition = false; | ||
| state.inInclude = false; | ||
| state.continueString = false; | ||
| state.pending = false; | ||
| return state; | ||
| }, | ||
| token: function (stream, state) { | ||
| if (stream.eatSpace()) return null; | ||
| return tokenize(stream, state); | ||
| } | ||
| }; | ||
| }); | ||
|
|
||
| CodeMirror.defineMIME("text/x-cmake", "cmake"); | ||
|
|
||
| }); |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,129 @@ | ||
| <!doctype html> | ||
|
|
||
| <title>CodeMirror: CMake mode</title> | ||
| <meta charset="utf-8"/> | ||
| <link rel=stylesheet href="../../doc/docs.css"> | ||
|
|
||
| <link rel="stylesheet" href="../../lib/codemirror.css"> | ||
| <script src="../../lib/codemirror.js"></script> | ||
| <script src="../../addon/edit/matchbrackets.js"></script> | ||
| <script src="cmake.js"></script> | ||
| <style> | ||
| .CodeMirror {border-top: 1px solid black; border-bottom: 1px solid black;} | ||
| .cm-s-default span.cm-arrow { color: red; } | ||
| </style> | ||
| <div id=nav> | ||
| <a href="http://codemirror.net"><h1>CodeMirror</h1><img id=logo src="../../doc/logo.png"></a> | ||
|
|
||
| <ul> | ||
| <li><a href="../../index.html">Home</a> | ||
| <li><a href="../../doc/manual.html">Manual</a> | ||
| <li><a href="https://github.com/codemirror/codemirror">Code</a> | ||
| </ul> | ||
| <ul> | ||
| <li><a href="../index.html">Language modes</a> | ||
| <li><a class=active href="#">CMake</a> | ||
| </ul> | ||
| </div> | ||
|
|
||
| <article> | ||
| <h2>CMake mode</h2> | ||
| <form><textarea id="code" name="code"> | ||
| # vim: syntax=cmake | ||
| if(NOT CMAKE_BUILD_TYPE) | ||
| # default to Release build for GCC builds | ||
| set(CMAKE_BUILD_TYPE Release CACHE STRING | ||
| "Choose the type of build, options are: None(CMAKE_CXX_FLAGS or CMAKE_C_FLAGS used) Debug Release RelWithDebInfo MinSizeRel." | ||
| FORCE) | ||
| endif() | ||
| message(STATUS "cmake version ${CMAKE_VERSION}") | ||
| if(POLICY CMP0025) | ||
| cmake_policy(SET CMP0025 OLD) # report Apple's Clang as just Clang | ||
| endif() | ||
| if(POLICY CMP0042) | ||
| cmake_policy(SET CMP0042 NEW) # MACOSX_RPATH | ||
| endif() | ||
|
|
||
| project (x265) | ||
| cmake_minimum_required (VERSION 2.8.8) # OBJECT libraries require 2.8.8 | ||
| include(CheckIncludeFiles) | ||
| include(CheckFunctionExists) | ||
| include(CheckSymbolExists) | ||
| include(CheckCXXCompilerFlag) | ||
|
|
||
| # X265_BUILD must be incremented each time the public API is changed | ||
| set(X265_BUILD 48) | ||
| configure_file("${PROJECT_SOURCE_DIR}/x265.def.in" | ||
| "${PROJECT_BINARY_DIR}/x265.def") | ||
| configure_file("${PROJECT_SOURCE_DIR}/x265_config.h.in" | ||
| "${PROJECT_BINARY_DIR}/x265_config.h") | ||
|
|
||
| SET(CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/cmake" "${CMAKE_MODULE_PATH}") | ||
|
|
||
| # System architecture detection | ||
| string(TOLOWER "${CMAKE_SYSTEM_PROCESSOR}" SYSPROC) | ||
| set(X86_ALIASES x86 i386 i686 x86_64 amd64) | ||
| list(FIND X86_ALIASES "${SYSPROC}" X86MATCH) | ||
| if("${SYSPROC}" STREQUAL "" OR X86MATCH GREATER "-1") | ||
| message(STATUS "Detected x86 target processor") | ||
| set(X86 1) | ||
| add_definitions(-DX265_ARCH_X86=1) | ||
| if("${CMAKE_SIZEOF_VOID_P}" MATCHES 8) | ||
| set(X64 1) | ||
| add_definitions(-DX86_64=1) | ||
| endif() | ||
| elseif(${SYSPROC} STREQUAL "armv6l") | ||
| message(STATUS "Detected ARM target processor") | ||
| set(ARM 1) | ||
| add_definitions(-DX265_ARCH_ARM=1 -DHAVE_ARMV6=1) | ||
| else() | ||
| message(STATUS "CMAKE_SYSTEM_PROCESSOR value `${CMAKE_SYSTEM_PROCESSOR}` is unknown") | ||
| message(STATUS "Please add this value near ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE}") | ||
| endif() | ||
|
|
||
| if(UNIX) | ||
| list(APPEND PLATFORM_LIBS pthread) | ||
| find_library(LIBRT rt) | ||
| if(LIBRT) | ||
| list(APPEND PLATFORM_LIBS rt) | ||
| endif() | ||
| find_package(Numa) | ||
| if(NUMA_FOUND) | ||
| list(APPEND CMAKE_REQUIRED_LIBRARIES ${NUMA_LIBRARY}) | ||
| check_symbol_exists(numa_node_of_cpu numa.h NUMA_V2) | ||
| if(NUMA_V2) | ||
| add_definitions(-DHAVE_LIBNUMA) | ||
| message(STATUS "libnuma found, building with support for NUMA nodes") | ||
| list(APPEND PLATFORM_LIBS ${NUMA_LIBRARY}) | ||
| link_directories(${NUMA_LIBRARY_DIR}) | ||
| include_directories(${NUMA_INCLUDE_DIR}) | ||
| endif() | ||
| endif() | ||
| mark_as_advanced(LIBRT NUMA_FOUND) | ||
| endif(UNIX) | ||
|
|
||
| if(X64 AND NOT WIN32) | ||
| option(ENABLE_PIC "Enable Position Independent Code" ON) | ||
| else() | ||
| option(ENABLE_PIC "Enable Position Independent Code" OFF) | ||
| endif(X64 AND NOT WIN32) | ||
|
|
||
| # Compiler detection | ||
| if(CMAKE_GENERATOR STREQUAL "Xcode") | ||
| set(XCODE 1) | ||
| endif() | ||
| if (APPLE) | ||
| add_definitions(-DMACOS) | ||
| endif() | ||
| </textarea></form> | ||
| <script> | ||
| var editor = CodeMirror.fromTextArea(document.getElementById("code"), { | ||
| mode: "text/x-cmake", | ||
| matchBrackets: true, | ||
| indentUnit: 4 | ||
| }); | ||
| </script> | ||
|
|
||
| <p><strong>MIME types defined:</strong> <code>text/x-cmake</code>.</p> | ||
|
|
||
| </article> |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -339,6 +339,7 @@ | |
| return scope.offset; | ||
| }, | ||
|
|
||
| closeBrackets: {triples: "'\""}, | ||
| lineComment: "#", | ||
| fold: "indent" | ||
| }; | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,146 @@ | ||
| <!doctype html> | ||
|
|
||
| <title>CodeMirror: troff mode</title> | ||
| <meta charset="utf-8"/> | ||
| <link rel=stylesheet href="../../doc/docs.css"> | ||
|
|
||
| <link rel=stylesheet href=../../lib/codemirror.css> | ||
| <script src=../../lib/codemirror.js></script> | ||
| <script src="../../addon/edit/matchbrackets.js"></script> | ||
| <script src=troff.js></script> | ||
| <style type=text/css> | ||
| .CodeMirror {border-top: 1px solid black; border-bottom: 1px solid black;} | ||
| </style> | ||
| <div id=nav> | ||
| <a href="http://codemirror.net"><h1>CodeMirror</h1><img id=logo src="../../doc/logo.png"></a> | ||
|
|
||
| <ul> | ||
| <li><a href="../../index.html">Home</a> | ||
| <li><a href="../../doc/manual.html">Manual</a> | ||
| <li><a href="https://github.com/codemirror/codemirror">Code</a> | ||
| </ul> | ||
| <ul> | ||
| <li><a href="../index.html">Language modes</a> | ||
| <li><a class=active href="#">troff</a> | ||
| </ul> | ||
| </div> | ||
|
|
||
| <article> | ||
| <h2>troff</h2> | ||
|
|
||
|
|
||
| <textarea id=code> | ||
| '\" t | ||
| .\" Title: mkvextract | ||
| .TH "MKVEXTRACT" "1" "2015\-02\-28" "MKVToolNix 7\&.7\&.0" "User Commands" | ||
| .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
| .ie \n(.g .ds Aq \(aq | ||
| .el .ds Aq ' | ||
| .\" ----------------------------------------------------------------- | ||
| .nh | ||
| .\" disable justification (adjust text to left margin only) | ||
| .ad l | ||
| .\" ----------------------------------------------------------------- | ||
| .SH "NAME" | ||
| mkvextract \- extract tracks from Matroska(TM) files into other files | ||
| .SH "SYNOPSIS" | ||
| .HP \w'\fBmkvextract\fR\ 'u | ||
| \fBmkvextract\fR {mode} {source\-filename} [options] [extraction\-spec] | ||
| .SH "DESCRIPTION" | ||
| .PP | ||
| .B mkvextract | ||
| extracts specific parts from a | ||
| .I Matroska(TM) | ||
| file to other useful formats\&. The first argument, | ||
| \fBmode\fR, tells | ||
| \fBmkvextract\fR(1) | ||
| what to extract\&. Currently supported is the extraction of | ||
| tracks, | ||
| tags, | ||
| attachments, | ||
| chapters, | ||
| CUE sheets, | ||
| timecodes | ||
| and | ||
| cues\&. The second argument is the name of the source file\&. It must be a | ||
| Matroska(TM) | ||
| file\&. All following arguments are options and extraction specifications; both of which depend on the selected mode\&. | ||
| .SS "Common options" | ||
| .PP | ||
| The following options are available in all modes and only described once in this section\&. | ||
| .PP | ||
| \fB\-f\fR, \fB\-\-parse\-fully\fR | ||
| .RS 4 | ||
| Sets the parse mode to \*(Aqfull\*(Aq\&. The default mode does not parse the whole file but uses the meta seek elements for locating the required elements of a source file\&. In 99% of all cases this is enough\&. But for files that do not contain meta seek elements or which are damaged the user might have to use this mode\&. A full scan of a file can take a couple of minutes while a fast scan only takes seconds\&. | ||
| .RE | ||
| .PP | ||
| \fB\-\-command\-line\-charset\fR \fIcharacter\-set\fR | ||
| .RS 4 | ||
| Sets the character set to convert strings given on the command line from\&. It defaults to the character set given by system\*(Aqs current locale\&. | ||
| .RE | ||
| .PP | ||
| \fB\-\-output\-charset\fR \fIcharacter\-set\fR | ||
| .RS 4 | ||
| Sets the character set to which strings are converted that are to be output\&. It defaults to the character set given by system\*(Aqs current locale\&. | ||
| .RE | ||
| .PP | ||
| \fB\-r\fR, \fB\-\-redirect\-output\fR \fIfile\-name\fR | ||
| .RS 4 | ||
| Writes all messages to the file | ||
| \fIfile\-name\fR | ||
| instead of to the console\&. While this can be done easily with output redirection there are cases in which this option is needed: when the terminal reinterprets the output before writing it to a file\&. The character set set with | ||
| \fB\-\-output\-charset\fR | ||
| is honored\&. | ||
| .RE | ||
| .PP | ||
| \fB\-\-ui\-language\fR \fIcode\fR | ||
| .RS 4 | ||
| Forces the translations for the language | ||
| \fIcode\fR | ||
| to be used (e\&.g\&. \*(Aqde_DE\*(Aq for the German translations)\&. It is preferable to use the environment variables | ||
| \fILANG\fR, | ||
| \fILC_MESSAGES\fR | ||
| and | ||
| \fILC_ALL\fR | ||
| though\&. Entering \*(Aqlist\*(Aq as the | ||
| \fIcode\fR | ||
| will cause | ||
| \fBmkvextract\fR(1) | ||
| to output a list of available translations\&. | ||
|
|
||
| .\" [...] | ||
|
|
||
| .SH "SEE ALSO" | ||
| .PP | ||
| \fBmkvmerge\fR(1), | ||
| \fBmkvinfo\fR(1), | ||
| \fBmkvpropedit\fR(1), | ||
| \fBmmg\fR(1) | ||
| .SH "WWW" | ||
| .PP | ||
| The latest version can always be found at | ||
| \m[blue]\fBthe MKVToolNix homepage\fR\m[]\&\s-2\u[1]\d\s+2\&. | ||
| .SH "AUTHOR" | ||
| .PP | ||
| \(co \fBMoritz Bunkus\fR <\&moritz@bunkus\&.org\&> | ||
| .RS 4 | ||
| Developer | ||
| .RE | ||
| .SH "NOTES" | ||
| .IP " 1." 4 | ||
| the MKVToolNix homepage | ||
| .RS 4 | ||
| \%https://www.bunkus.org/videotools/mkvtoolnix/ | ||
| .RE | ||
| </textarea> | ||
|
|
||
| <script> | ||
| var editor = CodeMirror.fromTextArea(document.getElementById('code'), { | ||
| mode: 'troff', | ||
| lineNumbers: true, | ||
| matchBrackets: false | ||
| }); | ||
| </script> | ||
|
|
||
| <p><strong>MIME types defined:</strong> <code>troff</code>.</p> | ||
| </article> |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,82 @@ | ||
| // 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('troff', 'troff'); | ||
|
|
||
| }); |