aboutsummaryrefslogtreecommitdiffstats
path: root/public/prism/prism-regex.min.js
blob: 194cb09d1f2c81e87b81035a15b7cdc687036491 (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
!(function (a) {
  var e = { pattern: /\\[\\(){}[\]^$+*?|.]/, alias: 'escape' },
    n =
      /\\(?:x[\da-fA-F]{2}|u[\da-fA-F]{4}|u\{[\da-fA-F]+\}|0[0-7]{0,2}|[123][0-7]{2}|c[a-zA-Z]|.)/,
    t = '(?:[^\\\\-]|' + n.source + ')',
    s = RegExp(t + '-' + t),
    i = { pattern: /(<|')[^<>']+(?=[>']$)/, lookbehind: !0, alias: 'variable' };
  a.languages.regex = {
    'char-class': {
      pattern: /((?:^|[^\\])(?:\\\\)*)\[(?:[^\\\]]|\\[\s\S])*\]/,
      lookbehind: !0,
      inside: {
        'char-class-negation': {
          pattern: /(^\[)\^/,
          lookbehind: !0,
          alias: 'operator',
        },
        'char-class-punctuation': { pattern: /^\[|\]$/, alias: 'punctuation' },
        range: {
          pattern: s,
          inside: {
            escape: n,
            'range-punctuation': { pattern: /-/, alias: 'operator' },
          },
        },
        'special-escape': e,
        'char-set': { pattern: /\\[wsd]|\\p\{[^{}]+\}/i, alias: 'class-name' },
        escape: n,
      },
    },
    'special-escape': e,
    'char-set': { pattern: /\.|\\[wsd]|\\p\{[^{}]+\}/i, alias: 'class-name' },
    backreference: [
      { pattern: /\\(?![123][0-7]{2})[1-9]/, alias: 'keyword' },
      {
        pattern: /\\k<[^<>']+>/,
        alias: 'keyword',
        inside: { 'group-name': i },
      },
    ],
    anchor: { pattern: /[$^]|\\[ABbGZz]/, alias: 'function' },
    escape: n,
    group: [
      {
        pattern:
          /\((?:\?(?:<[^<>']+>|'[^<>']+'|[>:]|<?[=!]|[idmnsuxU]+(?:-[idmnsuxU]+)?:?))?/,
        alias: 'punctuation',
        inside: { 'group-name': i },
      },
      { pattern: /\)/, alias: 'punctuation' },
    ],
    quantifier: { pattern: /(?:[+*?]|\{\d+(?:,\d*)?\})[?+]?/, alias: 'number' },
    alternation: { pattern: /\|/, alias: 'keyword' },
  };
})(Prism);
margin-top: var(--spacing-md); } } } p { font-size: var(--font-size-md); margin: 0 0 var(--spacing-sm); } small { font-size: var(--font-size-sm); } ol { list-style-type: none; counter-reset: li; padding: 0; > li { display: table; counter-increment: li; &::before { content: counters(li, ".") ". "; color: var(--color-secondary); display: table-cell; padding-right: var(--spacing-2xs); } } li ol > li::before { content: counters(li, ".") ". "; } } ul, ol { li { margin-bottom: var(--spacing-2xs); &:last-child { margin-bottom: 0; } } ::marker { color: var(--color-primary-dark); } } ul { padding-left: var(--spacing-sm); } dl { display: flex; flex-flow: row wrap; gap: var(--spacing-2xs); } ul, ol, dl { margin: var(--spacing-md) 0; & & { margin: var(--spacing-2xs) 0 0; } } dt { flex: 0 0 max-content; font-weight: 600; } dd { flex: 0 0 auto; margin: 0; } a { background: linear-gradient(to top, var(--color-primary) 50%, transparent 50%) 0 0 / 100% 200% no-repeat; color: var(--color-primary); text-decoration-thickness: 13%; text-underline-offset: 20%; transition: all 0.3s linear 0s, text-decoration 0.18s ease-in-out 0s; &:hover { color: var(--color-primary-light); text-decoration-thickness: 23%; } &:focus { background-position: 0 100%; color: var(--color-fg-inverted); } &:active { background-position: 0 0; color: var(--color-primary-dark); text-decoration-thickness: 18%; } &.external { &::after { display: inline-block; content: "\0000a0"url(fun.encode-svg('<svg width="13" viewBox="0 0 100 100" xmlns="http://www.w3.org/2000/svg"><path fill="#{var.$light-theme_blue}" d="M100 0 59.543 5.887l20.8 6.523-51.134 51.134 7.249 7.248L87.59 19.66l6.522 20.798z"/><path fill="#{var.$light-theme_blue}" d="M4 10a4 4 0 0 0-4 4v82a4 4 0 0 0 4 4h82a4 4 0 0 0 4-4V62.314h-8V92H8V18h29.686v-8z"/></svg>')); } &:focus:not(:active)::after { content: "\0000a0"url(fun.encode-svg('<svg width="13" viewBox="0 0 100 100" xmlns="http://www.w3.org/2000/svg"><path fill="#{var.$light-theme_white}" d="M100 0 59.543 5.887l20.8 6.523-51.134 51.134 7.249 7.248L87.59 19.66l6.522 20.798z"/><path fill="#{var.$light-theme_white}" d="M4 10a4 4 0 0 0-4 4v82a4 4 0 0 0 4 4h82a4 4 0 0 0 4-4V62.314h-8V92H8V18h29.686v-8z"/></svg>')); } } &[hreflang] { &::after { display: inline-block; content: "\0000a0["attr(hreflang) "]"; font-size: var(--font-size-sm); } &.external { &::after { content: "\0000a0["attr(hreflang) "]\0000a0"url(fun.encode-svg( '<svg width="13" viewBox="0 0 100 100" xmlns="http://www.w3.org/2000/svg"><path fill="#{var.$light-theme_blue}" d="M100 0 59.543 5.887l20.8 6.523-51.134 51.134 7.249 7.248L87.59 19.66l6.522 20.798z"/><path fill="#{var.$light-theme_blue}" d="M4 10a4 4 0 0 0-4 4v82a4 4 0 0 0 4 4h82a4 4 0 0 0 4-4V62.314h-8V92H8V18h29.686v-8z"/></svg>' )); } &:focus:not(:active)::after { content: "\0000a0["attr(hreflang) "]\0000a0"url(fun.encode-svg( '<svg width="13" viewBox="0 0 100 100" xmlns="http://www.w3.org/2000/svg"><path fill="#{var.$light-theme_white}" d="M100 0 59.543 5.887l20.8 6.523-51.134 51.134 7.249 7.248L87.59 19.66l6.522 20.798z"/><path fill="#{var.$light-theme_white}" d="M4 10a4 4 0 0 0-4 4v82a4 4 0 0 0 4 4h82a4 4 0 0 0 4-4V62.314h-8V92H8V18h29.686v-8z"/></svg>' )); } } } } button, input, optgroup, select, textarea { line-height: var(--line-height); } code, kbd, pre, var { font-family: var(--font-family-mono); } :not(pre) > code, kbd, var, samp { background: var(--color-bg-code); border: fun.convert-px(1) solid var(--color-border); border-radius: fun.convert-px(3); color: var(--color-primary-darker); font-style: normal; padding: fun.convert-px(2) fun.convert-px(5) fun.convert-px(1) fun.convert-px(5); } kbd { box-shadow: fun.convert-px(1) fun.convert-px(1) 0 fun.convert-px(1) var(--color-shadow); } pre { display: block; max-width: 100%; overflow: auto; white-space: pre; word-spacing: normal; word-break: normal; word-wrap: normal; } figure { margin: var(--spacing-md) 0; } figcaption { margin-top: var(--spacing-xs); font-size: var(--font-size-sm); text-align: center; }