Prism.languages.tcl = { comment: { pattern: /(^|[^\\])#.*/, lookbehind: !0 }, string: { pattern: /"(?:[^"\\\r\n]|\\(?:\r\n|[\s\S]))*"/, greedy: !0 }, variable: [ { pattern: /(\$)(?:::)?(?:[a-zA-Z0-9]+::)*\w+/, lookbehind: !0 }, { pattern: /(\$)\{[^}]+\}/, lookbehind: !0 }, { pattern: /(^[\t ]*set[ \t]+)(?:::)?(?:[a-zA-Z0-9]+::)*\w+/m, lookbehind: !0, }, ], function: { pattern: /(^[\t ]*proc[ \t]+)\S+/m, lookbehind: !0 }, builtin: [ { pattern: /(^[\t ]*)(?:break|class|continue|error|eval|exit|for|foreach|if|proc|return|switch|while)\b/m, lookbehind: !0, }, /\b(?:else|elseif)\b/, ], scope: { pattern: /(^[\t ]*)(?:global|upvar|variable)\b/m, lookbehind: !0, alias: 'constant', }, keyword: { pattern: /(^[\t ]*|\[)(?:Safe_Base|Tcl|after|append|apply|array|auto_(?:execok|import|load|mkindex|qualify|reset)|automkindex_old|bgerror|binary|catch|cd|chan|clock|close|concat|dde|dict|encoding|eof|exec|expr|fblocked|fconfigure|fcopy|file(?:event|name)?|flush|gets|glob|history|http|incr|info|interp|join|lappend|lassign|lindex|linsert|list|llength|load|lrange|lrepeat|lreplace|lreverse|lsearch|lset|lsort|math(?:func|op)|memory|msgcat|namespace|open|package|parray|pid|pkg_mkIndex|platform|puts|pwd|re_syntax|read|refchan|regexp|registry|regsub|rename|scan|seek|set|socket|source|split|string|subst|tcl(?:_endOfWord|_findLibrary|startOf(?:Next|Previous)Word|test|vars|wordBreak(?:After|Before))|tell|time|tm|trace|unknown|unload|unset|update|uplevel|vwait)\b/m, lookbehind: !0, }, operator: /!=?|\*\*?|==|&&?|\|\|?|<[=<]?|>[=>]?|[-+~\/%?^]|\b(?:eq|in|ne|ni)\b/, punctuation: /[{}()\[\]]/, }; f='/www.armandphilippot.com/commit/public/prism/prism-liquid.min.js?h=v1.1.0&id=52404177c07a2aab7fc894362fb3060dff2431a0'>commitdiffstats
path: root/public/prism/prism-liquid.min.js
blob: d4089c22ed9b2877e6e7c6b55fba8d2e3c46fbc2 (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
(Prism.languages.liquid = {
  comment: {
    pattern: /(^\{%\s*comment\s*%\})[\s\S]+(?=\{%\s*endcomment\s*%\}$)/,
    lookbehind: !0,
  },
  delimiter: {
    pattern: /^\{(?:\{\{|[%\{])-?|-?(?:\}\}|[%\}])\}$/,
    alias: 'punctuation',
  },
  string: { pattern: /"[^"]*"|'[^']*'/, greedy: !0 },
  keyword:
    /\b(?:as|assign|break|(?:end)?(?:capture|case|comment|for|form|if|paginate|raw|style|tablerow|unless)|continue|cycle|decrement|echo|else|elsif|in|include|increment|limit|liquid|offset|range|render|reversed|section|when|with)\b/,
  object:
    /\b(?:address|all_country_option_tags|article|block|blog|cart|checkout|collection|color|country|country_option_tags|currency|current_page|current_tags|customer|customer_address|date|discount_allocation|discount_application|external_video|filter|filter_value|font|forloop|fulfillment|generic_file|gift_card|group|handle|image|line_item|link|linklist|localization|location|measurement|media|metafield|model|model_source|order|page|page_description|page_image|page_title|part|policy|product|product_option|recommendations|request|robots|routes|rule|script|search|selling_plan|selling_plan_allocation|selling_plan_group|shipping_method|shop|shop_locale|sitemap|store_availability|tax_line|template|theme|transaction|unit_price_measurement|user_agent|variant|video|video_source)\b/,
  function: [
    { pattern: /(\|\s*)\w+/, lookbehind: !0, alias: 'filter' },
    { pattern: /(\.\s*)(?:first|last|size)/, lookbehind: !0 },
  ],
  boolean: /\b(?:false|nil|true)\b/,
  range: { pattern: /\.\./, alias: 'operator' },
  number: /\b\d+(?:\.\d+)?\b/,
  operator: /[!=]=|<>|[<>]=?|[|?:=-]|\b(?:and|contains(?=\s)|or)\b/,
  punctuation: /[.,\[\]()]/,
  empty: { pattern: /\bempty\b/, alias: 'keyword' },
}),
  Prism.hooks.add('before-tokenize', function (e) {
    var i = !1;
    Prism.languages['markup-templating'].buildPlaceholders(
      e,
      'liquid',
      /\{%\s*comment\s*%\}[\s\S]*?\{%\s*endcomment\s*%\}|\{(?:%[\s\S]*?%|\{\{[\s\S]*?\}\}|\{[\s\S]*?\})\}/g,
      function (e) {
        var t = /^\{%-?\s*(\w+)/.exec(e);
        if (t) {
          var n = t[1];
          if ('raw' === n && !i) return (i = !0);
          if ('endraw' === n) return !(i = !1);
        }
        return !i;
      }
    );
  }),
  Prism.hooks.add('after-tokenize', function (e) {
    Prism.languages['markup-templating'].tokenizePlaceholders(e, 'liquid');
  });