openrat-cms

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README

jinja2.min.js (2201B)


      1 (function(e){if(typeof exports=='object'&&typeof module=='object')e(require('../../lib/codemirror'));else if(typeof define=='function'&&define.amd)define(['../../lib/codemirror'],e);else e(CodeMirror)})(function(e){'use strict';e.defineMode('jinja2',function(){var n=['and','as','block','endblock','by','cycle','debug','else','elif','extends','filter','endfilter','firstof','for','endfor','if','endif','ifchanged','endifchanged','ifequal','endifequal','ifnotequal','endifnotequal','in','include','load','not','now','or','parsed','regroup','reversed','spaceless','endspaceless','ssi','templatetag','openblock','closeblock','openvariable','closevariable','openbrace','closebrace','opencomment','closecomment','widthratio','url','with','endwith','get_current_language','trans','endtrans','noop','blocktrans','endblocktrans','get_available_languages','get_current_language_bidi','plural'],i=/^[+\-*&%=<>!?|~^]/,r=/^[:\[\(\{]/,e=['true','false'],t=/^(\d[+\-\*\/])?\d+(\.\d+)?/;n=new RegExp('(('+n.join(')|(')+'))\\b');e=new RegExp('(('+e.join(')|(')+'))\\b');function o(o,a){var f=o.peek();if(a.incomment){if(!o.skipTo('#}')){o.skipToEnd()}
      2 else{o.eatWhile(/\#|}/);a.incomment=!1};return'comment'}
      3 else if(a.intag){if(a.operator){a.operator=!1;if(o.match(e)){return'atom'};if(o.match(t)){return'number'}};if(a.sign){a.sign=!1;if(o.match(e)){return'atom'};if(o.match(t)){return'number'}};if(a.instring){if(f==a.instring){a.instring=!1};o.next();return'string'}
      4 else if(f=='\''||f=='"'){a.instring=f;o.next();return'string'}
      5 else if(o.match(a.intag+'}')||o.eat('-')&&o.match(a.intag+'}')){a.intag=!1;return'tag'}
      6 else if(o.match(i)){a.operator=!0;return'operator'}
      7 else if(o.match(r)){a.sign=!0}
      8 else{if(o.eat(' ')||o.sol()){if(o.match(n)){return'keyword'};if(o.match(e)){return'atom'};if(o.match(t)){return'number'};if(o.sol()){o.next()}}
      9 else{o.next()}};return'variable'}
     10 else if(o.eat('{')){if(o.eat('#')){a.incomment=!0;if(!o.skipTo('#}')){o.skipToEnd()}
     11 else{o.eatWhile(/\#|}/);a.incomment=!1};return'comment'}
     12 else if(f=o.eat(/\{|%/)){a.intag=f;if(f=='{'){a.intag='}'};o.eat('-');return'tag'}};o.next()};return{startState:function(){return{tokenize:o}},token:function(e,n){return n.tokenize(e,n)}}})});