(this["webpackJsonpPlugin"] = this["webpackJsonpPlugin"] || []).push([[88],{

/***/ 946:
/***/ (function(module, exports, __webpack_require__) {

/* WEBPACK VAR INJECTION */(function(module) {var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }

// CodeMirror, copyright (c) by Marijn Haverbeke and others
// Distributed under an MIT license: https://codemirror.net/LICENSE
(function (mod) {
  if (( false ? undefined : _typeof(exports)) == "object" && ( false ? undefined : _typeof(module)) == "object") // CommonJS
    mod(__webpack_require__(266));else if (true) // AMD
    !(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__(266)], __WEBPACK_AMD_DEFINE_FACTORY__ = (mod),
				__WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?
				(__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__),
				__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));else // Plain browser env
    {}
})(function (CodeMirror) {
  "use strict";

  CodeMirror.defineMode("rpm-changes", function () {
    var headerSeperator = /^-+$/;
    var headerLine = /^(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} - /;
    var simpleEmail = /^[\w+.-]+@[\w.-]+/;
    return {
      token: function token(stream) {
        if (stream.sol()) {
          if (stream.match(headerSeperator)) {
            return 'tag';
          }

          if (stream.match(headerLine)) {
            return 'tag';
          }
        }

        if (stream.match(simpleEmail)) {
          return 'string';
        }

        stream.next();
        return null;
      }
    };
  });
  CodeMirror.defineMIME("text/x-rpm-changes", "rpm-changes"); // Quick and dirty spec file highlighting

  CodeMirror.defineMode("rpm-spec", function () {
    var arch = /^(i386|i586|i686|x86_64|ppc64le|ppc64|ppc|ia64|s390x|s390|sparc64|sparcv9|sparc|noarch|alphaev6|alpha|hppa|mipsel)/;
    var preamble = /^[a-zA-Z0-9()]+:/;
    var section = /^%(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)/;
    var control_flow_complex = /^%(ifnarch|ifarch|if)/; // rpm control flow macros

    var control_flow_simple = /^%(else|endif)/; // rpm control flow macros

    var operators = /^(\!|\?|\<\=|\<|\>\=|\>|\=\=|\&\&|\|\|)/; // operators in control flow macros

    return {
      startState: function startState() {
        return {
          controlFlow: false,
          macroParameters: false,
          section: false
        };
      },
      token: function token(stream, state) {
        var ch = stream.peek();

        if (ch == "#") {
          stream.skipToEnd();
          return "comment";
        }

        if (stream.sol()) {
          if (stream.match(preamble)) {
            return "header";
          }

          if (stream.match(section)) {
            return "atom";
          }
        }

        if (stream.match(/^\$\w+/)) {
          return "def";
        } // Variables like '$RPM_BUILD_ROOT'


        if (stream.match(/^\$\{\w+\}/)) {
          return "def";
        } // Variables like '${RPM_BUILD_ROOT}'


        if (stream.match(control_flow_simple)) {
          return "keyword";
        }

        if (stream.match(control_flow_complex)) {
          state.controlFlow = true;
          return "keyword";
        }

        if (state.controlFlow) {
          if (stream.match(operators)) {
            return "operator";
          }

          if (stream.match(/^(\d+)/)) {
            return "number";
          }

          if (stream.eol()) {
            state.controlFlow = false;
          }
        }

        if (stream.match(arch)) {
          if (stream.eol()) {
            state.controlFlow = false;
          }

          return "number";
        } // Macros like '%make_install' or '%attr(0775,root,root)'


        if (stream.match(/^%[\w]+/)) {
          if (stream.match(/^\(/)) {
            state.macroParameters = true;
          }

          return "keyword";
        }

        if (state.macroParameters) {
          if (stream.match(/^\d+/)) {
            return "number";
          }

          if (stream.match(/^\)/)) {
            state.macroParameters = false;
            return "keyword";
          }
        } // Macros like '%{defined fedora}'


        if (stream.match(/^%\{\??[\w \-\:\!]+\}/)) {
          if (stream.eol()) {
            state.controlFlow = false;
          }

          return "def";
        } //TODO: Include bash script sub-parser (CodeMirror supports that)


        stream.next();
        return null;
      }
    };
  });
  CodeMirror.defineMIME("text/x-rpm-spec", "rpm-spec");
});
/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(102)(module)))

/***/ })

}]);