Prism.languages.elm = { comment: /--.*|\{-[\s\S]*?-\}/, char: { pattern: /'(?:[^\\'\r\n]|\\(?:[abfnrtv\\']|\d+|x[0-9a-fA-F]+|u\{[0-9a-fA-F]+\}))'/, greedy: true, }, string: [ { // Multiline strings are wrapped in triple ". Quotes may appear unescaped. pattern: /"""[\s\S]*?"""/, greedy: true, }, { pattern: /"(?:[^\\"\r\n]|\\.)*"/, greedy: true, }, ], 'import-statement': { // The imported or hidden names are not included in this import // statement. This is because we want to highlight those exactly like // we do for the names in the program. pattern: /(^[\t ]*)import\s+[A-Z]\w*(?:\.[A-Z]\w*)*(?:\s+as\s+(?:[A-Z]\w*)(?:\.[A-Z]\w*)*)?(?:\s+exposing\s+)?/m, lookbehind: true, inside: { keyword: /\b(?:as|exposing|import)\b/, }, }, keyword: /\b(?:alias|as|case|else|exposing|if|in|infixl|infixr|let|module|of|then|type)\b/, // These are builtin variables only. Constructors are highlighted later as a constant. builtin: /\b(?:abs|acos|always|asin|atan|atan2|ceiling|clamp|compare|cos|curry|degrees|e|flip|floor|fromPolar|identity|isInfinite|isNaN|logBase|max|min|negate|never|not|pi|radians|rem|round|sin|sqrt|tan|toFloat|toPolar|toString|truncate|turns|uncurry|xor)\b/, // decimal integers and floating point numbers | hexadecimal integers number: /\b(?:\d+(?:\.\d+)?(?:e[+-]?\d+)?|0x[0-9a-f]+)\b/i, // Most of this is needed because of the meaning of a single '.'. // If it stands alone freely, it is the function composition. // It may also be a separator between a module name and an identifier => no // operator. If it comes together with other special characters it is an // operator too. // Valid operator characters in 0.18: +-/*=.$<>:&|^?%#@~! // Ref: https://groups.google.com/forum/#!msg/elm-dev/0AHSnDdkSkQ/E0SVU70JEQAJ operator: /\s\.\s|[+\-/*=.$<>:&|^?%#@~!]{2,}|[+\-/*=$<>:&|^?%#@~!]/, // In Elm, nearly everything is a variable, do not highlight these. hvariable: /\b(?:[A-Z]\w*\.)*[a-z]\w*\b/, constant: /\b(?:[A-Z]\w*\.)*[A-Z]\w*\b/, punctuation: /[{}[\]|(),.:]/, }; ippot.com/log/public/prism/prism-http.min.js'>
path: root/public/prism/prism-http.min.js
blob: 12c5e3ada0faf586fda51a759c99b704f39afaeb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
!(function (t) {
  function a(t) {
    return RegExp('(^(?:' + t + '):[ \t]*(?![ \t]))[^]+', 'i');
  }
  t.languages.http = {
    'request-line': {
      pattern:
        /^(?:CONNECT|DELETE|GET|HEAD|OPTIONS|PATCH|POST|PRI|PUT|SEARCH|TRACE)\s(?:https?:\/\/|\/)\S*\sHTTP\/[\d.]+/m,
      inside: {
        method: { pattern: /^[A-Z]+\b/, alias: 'property' },
        'request-target': {
          pattern: /^(\s)(?:https?:\/\/|\/)\S*(?=\s)/,
          lookbehind: !0,
          alias: 'url',
          inside: t.languages.uri,
        },
        'http-version': {
          pattern: /^(\s)HTTP\/[\d.]+/,
          lookbehind: !0,
          alias: 'property',
        },
      },
    },
    'response-status': {
      pattern: /^HTTP\/[\d.]+ \d+ .+/m,
      inside: {
        'http-version': { pattern: /^HTTP\/[\d.]+/, alias: 'property' },
        'status-code': {
          pattern: /^(\s)\d+(?=\s)/,
          lookbehind: !0,
          alias: 'number',
        },
        'reason-phrase': {
          pattern: /^(\s).+/,
          lookbehind: !0,
          alias: 'string',
        },
      },
    },
    header: {
      pattern: /^[\w-]+:.+(?:(?:\r\n?|\n)[ \t].+)*/m,
      inside: {
        'header-value': [
          {
            pattern: a('Content-Security-Policy'),
            lookbehind: !0,
            alias: ['csp', 'languages-csp'],
            inside: t.languages.csp,
          },
          {
            pattern: a('Public-Key-Pins(?:-Report-Only)?'),
            lookbehind: !0,
            alias: ['hpkp', 'languages-hpkp'],
            inside: t.languages.hpkp,
          },
          {
            pattern: a('Strict-Transport-Security'),
            lookbehind: !0,
            alias: ['hsts', 'languages-hsts'],
            inside: t.languages.hsts,
          },
          { pattern: a('[^:]+'), lookbehind: !0 },
        ],
        'header-name': { pattern: /^[^:]+/, alias: 'keyword' },
        punctuation: /^:/,
      },
    },
  };
  var e,
    n,
    s,
    i = t.languages,
    p = {
      'application/javascript': i.javascript,
      'application/json': i.json || i.javascript,
      'application/xml': i.xml,
      'text/xml': i.xml,
      'text/html': i.html,
      'text/css': i.css,
      'text/plain': i.plain,
    },
    r = { 'application/json': !0, 'application/xml': !0 };
  for (var l in p)
    if (p[l]) {
      e = e || {};
      var o = r[l]
        ? (void 0,
          (s = (n = l).replace(/^[a-z]+\//, '')),
          '(?:' + n + '|\\w+/(?:[\\w.-]+\\+)+' + s + '(?![+\\w.-]))')
        : l;
      e[l.replace(/\//g, '-')] = {
        pattern: RegExp(
          '(content-type:\\s*' +
            o +
            '(?:(?:\r\n?|\n)[\\w-].*)*(?:\r(?:\n|(?!\n))|\n))[^ \t\\w-][^]*',
          'i'
        ),
        lookbehind: !0,
        inside: p[l],
      };
    }
  e && t.languages.insertBefore('http', 'header', e);
})(Prism);