mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-06-03 16:38:50 -04:00
Upgrade CodeMirror to 5.10.1 and now support fullscreen, jump-to-line in editor
This commit is contained in:
parent
ce65e58096
commit
eaa8ccaccb
381 changed files with 6726 additions and 2636 deletions
25
public/vendor/codemirror/mode/django/django.js
vendored
Executable file → Normal file
25
public/vendor/codemirror/mode/django/django.js
vendored
Executable file → Normal file
|
@ -14,14 +14,14 @@
|
|||
"use strict";
|
||||
|
||||
CodeMirror.defineMode("django:inner", function() {
|
||||
var keywords = ["block", "endblock", "for", "endfor", "true", "false",
|
||||
"loop", "none", "self", "super", "if", "endif", "as",
|
||||
"else", "import", "with", "endwith", "without", "context", "ifequal", "endifequal",
|
||||
"ifnotequal", "endifnotequal", "extends", "include", "load", "comment",
|
||||
"endcomment", "empty", "url", "static", "trans", "blocktrans", "now", "regroup",
|
||||
"lorem", "ifchanged", "endifchanged", "firstof", "debug", "cycle", "csrf_token",
|
||||
"autoescape", "endautoescape", "spaceless", "ssi", "templatetag",
|
||||
"verbatim", "endverbatim", "widthratio"],
|
||||
var keywords = ["block", "endblock", "for", "endfor", "true", "false", "filter", "endfilter",
|
||||
"loop", "none", "self", "super", "if", "elif", "endif", "as", "else", "import",
|
||||
"with", "endwith", "without", "context", "ifequal", "endifequal", "ifnotequal",
|
||||
"endifnotequal", "extends", "include", "load", "comment", "endcomment",
|
||||
"empty", "url", "static", "trans", "blocktrans", "endblocktrans", "now",
|
||||
"regroup", "lorem", "ifchanged", "endifchanged", "firstof", "debug", "cycle",
|
||||
"csrf_token", "autoescape", "endautoescape", "spaceless", "endspaceless",
|
||||
"ssi", "templatetag", "verbatim", "endverbatim", "widthratio"],
|
||||
filters = ["add", "addslashes", "capfirst", "center", "cut", "date",
|
||||
"default", "default_if_none", "dictsort",
|
||||
"dictsortreversed", "divisibleby", "escape", "escapejs",
|
||||
|
@ -35,11 +35,13 @@
|
|||
"truncatechars_html", "truncatewords", "truncatewords_html",
|
||||
"unordered_list", "upper", "urlencode", "urlize",
|
||||
"urlizetrunc", "wordcount", "wordwrap", "yesno"],
|
||||
operators = ["==", "!=", "<", ">", "<=", ">=", "in", "not", "or", "and"];
|
||||
operators = ["==", "!=", "<", ">", "<=", ">="],
|
||||
wordOperators = ["in", "not", "or", "and"];
|
||||
|
||||
keywords = new RegExp("^\\b(" + keywords.join("|") + ")\\b");
|
||||
filters = new RegExp("^\\b(" + filters.join("|") + ")\\b");
|
||||
operators = new RegExp("^\\b(" + operators.join("|") + ")\\b");
|
||||
wordOperators = new RegExp("^\\b(" + wordOperators.join("|") + ")\\b");
|
||||
|
||||
// We have to return "null" instead of null, in order to avoid string
|
||||
// styling as the default, when using Django templates inside HTML
|
||||
|
@ -270,6 +272,11 @@
|
|||
return "operator";
|
||||
}
|
||||
|
||||
// Attempt to match a word operator
|
||||
if (stream.match(wordOperators)) {
|
||||
return "keyword";
|
||||
}
|
||||
|
||||
// Attempt to match a keyword
|
||||
var keywordMatch = stream.match(keywords);
|
||||
if (keywordMatch) {
|
||||
|
|
0
public/vendor/codemirror/mode/django/index.html
vendored
Executable file → Normal file
0
public/vendor/codemirror/mode/django/index.html
vendored
Executable file → Normal file
Loading…
Add table
Add a link
Reference in a new issue