openrat-cms

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

rpm.min.js (2041B)


      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('rpm-changes',function(){var e=/^-+$/,r=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)  ?\d{1,2} \d{2}:\d{2}(:\d{2})? [A-Z]{3,4} \d{4} - /,t=/^[\w+.-]+@[\w.-]+/;return{token:function(n){if(n.sol()){if(n.match(e)){return'tag'};if(n.match(r)){return'tag'}};if(n.match(t)){return'string'};n.next();return null}}});e.defineMIME('text/x-rpm-changes','rpm-changes');e.defineMode('rpm-spec',function(){var e=/^(i386|i586|i686|x86_64|ppc64le|ppc64|ppc|ia64|s390x|s390|sparc64|sparcv9|sparc|noarch|alphaev6|alpha|hppa|mipsel)/,r=/^[a-zA-Z0-9()]+:/,t=/^%(debug_package|package|description|prep|build|install|files|clean|changelog|preinstall|preun|postinstall|postun|pretrans|posttrans|pre|post|triggerin|triggerun|verifyscript|check|triggerpostun|triggerprein|trigger)/,n=/^%(ifnarch|ifarch|if)/,i=/^%(else|endif)/,o=/^(\!|\?|\<\=|\<|\>\=|\>|\=\=|\&\&|\|\|)/;return{startState:function(){return{controlFlow:!1,macroParameters:!1,section:!1}},token:function(a,c){var f=a.peek();if(f=='#'){a.skipToEnd();return'comment'};if(a.sol()){if(a.match(r)){return'header'};if(a.match(t)){return'atom'}};if(a.match(/^\$\w+/)){return'def'};if(a.match(/^\$\{\w+\}/)){return'def'};if(a.match(i)){return'keyword'};if(a.match(n)){c.controlFlow=!0;return'keyword'};if(c.controlFlow){if(a.match(o)){return'operator'};if(a.match(/^(\d+)/)){return'number'};if(a.eol()){c.controlFlow=!1}};if(a.match(e)){if(a.eol()){c.controlFlow=!1};return'number'};if(a.match(/^%[\w]+/)){if(a.match(/^\(/)){c.macroParameters=!0};return'keyword'};if(c.macroParameters){if(a.match(/^\d+/)){return'number'};if(a.match(/^\)/)){c.macroParameters=!1;return'keyword'}};if(a.match(/^%\{\??[\w \-\:\!]+\}/)){if(a.eol()){c.controlFlow=!1};return'def'};a.next();return null}}});e.defineMIME('text/x-rpm-spec','rpm-spec')});