summaryrefslogtreecommitdiffstats
path: root/public/prism/prism-robotframework.min.js
blob: 1674f1ad858a3e59c9fecedfae8ef74548dac531 (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
!(function (t) {
  var r = { pattern: /(^[ \t]*| {2}|\t)#.*/m, lookbehind: !0, greedy: !0 },
    o = {
      pattern: /((?:^|[^\\])(?:\\{2})*)[$@&%]\{(?:[^{}\r\n]|\{[^{}\r\n]*\})*\}/,
      lookbehind: !0,
      inside: { punctuation: /^[$@&%]\{|\}$/ },
    };
  function n(t, n) {
    var e = {
      'section-header': { pattern: /^ ?\*{3}.+?\*{3}/, alias: 'keyword' },
    };
    for (var a in n) e[a] = n[a];
    return (
      (e.tag = {
        pattern: /([\r\n](?: {2}|\t)[ \t]*)\[[-\w]+\]/,
        lookbehind: !0,
        inside: { punctuation: /\[|\]/ },
      }),
      (e.variable = o),
      (e.comment = r),
      {
        pattern: RegExp(
          '^ ?\\*{3}[ \t]*<name>[ \t]*\\*{3}(?:.|[\r\n](?!\\*{3}))*'.replace(
            /<name>/g,
            function () {
              return t;
            }
          ),
          'im'
        ),
        alias: 'section',
        inside: e,
      }
    );
  }
  var e = {
      pattern:
        /(\[Documentation\](?: {2}|\t)[ \t]*)(?![ \t]|#)(?:.|(?:\r\n?|\n)[ \t]*\.{3})+/,
      lookbehind: !0,
      alias: 'string',
    },
    a = {
      pattern: /([\r\n] ?)(?!#)(?:\S(?:[ \t]\S)*)+/,
      lookbehind: !0,
      alias: 'function',
      inside: { variable: o },
    },
    i = {
      pattern: /([\r\n](?: {2}|\t)[ \t]*)(?!\[|\.{3}|#)(?:\S(?:[ \t]\S)*)+/,
      lookbehind: !0,
      inside: { variable: o },
    };
  (t.languages.robotframework = {
    settings: n('Settings', {
      documentation: {
        pattern:
          /([\r\n] ?Documentation(?: {2}|\t)[ \t]*)(?![ \t]|#)(?:.|(?:\r\n?|\n)[ \t]*\.{3})+/,
        lookbehind: !0,
        alias: 'string',
      },
      property: {
        pattern: /([\r\n] ?)(?!\.{3}|#)(?:\S(?:[ \t]\S)*)+/,
        lookbehind: !0,
      },
    }),
    variables: n('Variables'),
    'test-cases': n('Test Cases', {
      'test-name': a,
      documentation: e,
      property: i,
    }),
    keywords: n('Keywords', {
      'keyword-name': a,
      documentation: e,
      property: i,
    }),
    tasks: n('Tasks', { 'task-name': a, documentation: e, property: i }),
    comment: r,
  }),
    (t.languages.robot = t.languages.robotframework);
})(Prism);