Prism.languages.idris = Prism.languages.extend('haskell', { comment: { pattern: /(?:(?:--|\|\|\|).*$|\{-[\s\S]*?-\})/m, }, keyword: /\b(?:Type|case|class|codata|constructor|corecord|data|do|dsl|else|export|if|implementation|implicit|import|impossible|in|infix|infixl|infixr|instance|interface|let|module|mutual|namespace|of|parameters|partial|postulate|private|proof|public|quoteGoal|record|rewrite|syntax|then|total|using|where|with)\b/, builtin: undefined, }); Prism.languages.insertBefore('idris', 'keyword', { 'import-statement': { pattern: /(^\s*import\s+)(?:[A-Z][\w']*)(?:\.[A-Z][\w']*)*/m, lookbehind: true, inside: { punctuation: /\./, }, }, }); Prism.languages.idr = Prism.languages.idris; logo'/> index : www.armandphilippot.com
The frontend of my personal website.Armand Philippot
summaryrefslogtreecommitdiffstats
path: root/public/prism/prism-json.js
blob: aa20c470b17f9aa8e67b5ef5cd470e2ce9a031d5 (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
// https://www.json.org/json-en.html
Prism.languages.json = {
  property: {
    pattern: /(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?=\s*:)/,
    lookbehind: true,
    greedy: true,
  },
  string: {
    pattern: /(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?!\s*:)/,
    lookbehind: true,
    greedy: true,
  },
  comment: {
    pattern: /\/\/.*|\/\*[\s\S]*?(?:\*\/|$)/,
    greedy: true,
  },
  number: /-?\b\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/i,
  punctuation: /[{}[\],]/,
  operator: /:/,
  boolean: /\b(?:false|true)\b/,
  null: {
    pattern: /\bnull\b/,
    alias: 'keyword',
  },
};

Prism.languages.webmanifest = Prism.languages.json;