diff options
author | Florian Dold <florian.dold@gmail.com> | 2017-05-24 15:10:37 +0200 |
---|---|---|
committer | Florian Dold <florian.dold@gmail.com> | 2017-05-24 15:11:17 +0200 |
commit | 7a3df06eb573d36142bd1a8e03c5ce8752d300b3 (patch) | |
tree | 70bfaea8884c374876f607774850a3a51c0cb381 /node_modules/highlight.js/lib/languages/django.js | |
parent | aca1143cb9eed16cf37f04e475e4257418dd18ac (diff) | |
download | wallet-core-7a3df06eb573d36142bd1a8e03c5ce8752d300b3.tar.xz |
fix build issues and add typedoc
Diffstat (limited to 'node_modules/highlight.js/lib/languages/django.js')
-rw-r--r-- | node_modules/highlight.js/lib/languages/django.js | 63 |
1 files changed, 63 insertions, 0 deletions
diff --git a/node_modules/highlight.js/lib/languages/django.js b/node_modules/highlight.js/lib/languages/django.js new file mode 100644 index 000000000..45cc0d313 --- /dev/null +++ b/node_modules/highlight.js/lib/languages/django.js @@ -0,0 +1,63 @@ +module.exports = function(hljs) { + var FILTER = { + begin: /\|[A-Za-z]+:?/, + keywords: { + name: + 'truncatewords removetags linebreaksbr yesno get_digit timesince random striptags ' + + 'filesizeformat escape linebreaks length_is ljust rjust cut urlize fix_ampersands ' + + 'title floatformat capfirst pprint divisibleby add make_list unordered_list urlencode ' + + 'timeuntil urlizetrunc wordcount stringformat linenumbers slice date dictsort ' + + 'dictsortreversed default_if_none pluralize lower join center default ' + + 'truncatewords_html upper length phone2numeric wordwrap time addslashes slugify first ' + + 'escapejs force_escape iriencode last safe safeseq truncatechars localize unlocalize ' + + 'localtime utc timezone' + }, + contains: [ + hljs.QUOTE_STRING_MODE, + hljs.APOS_STRING_MODE + ] + }; + + return { + aliases: ['jinja'], + case_insensitive: true, + subLanguage: 'xml', + contains: [ + hljs.COMMENT(/\{%\s*comment\s*%}/, /\{%\s*endcomment\s*%}/), + hljs.COMMENT(/\{#/, /#}/), + { + className: 'template-tag', + begin: /\{%/, end: /%}/, + contains: [ + { + className: 'name', + begin: /\w+/, + keywords: { + name: + 'comment endcomment load templatetag ifchanged endifchanged if endif firstof for ' + + 'endfor ifnotequal endifnotequal widthratio extends include spaceless ' + + 'endspaceless regroup ifequal endifequal ssi now with cycle url filter ' + + 'endfilter debug block endblock else autoescape endautoescape csrf_token empty elif ' + + 'endwith static trans blocktrans endblocktrans get_static_prefix get_media_prefix ' + + 'plural get_current_language language get_available_languages ' + + 'get_current_language_bidi get_language_info get_language_info_list localize ' + + 'endlocalize localtime endlocaltime timezone endtimezone get_current_timezone ' + + 'verbatim' + }, + starts: { + endsWithParent: true, + keywords: 'in by as', + contains: [FILTER], + relevance: 0 + } + } + ] + }, + { + className: 'template-variable', + begin: /\{\{/, end: /}}/, + contains: [FILTER] + } + ] + }; +};
\ No newline at end of file |