UNPKG

720 BJavaScriptView Raw
1Prism.languages.gettext = {
2 'comment': [
3 {
4 pattern: /# .*/,
5 greedy: true,
6 alias: 'translator-comment'
7 },
8 {
9 pattern: /#\..*/,
10 greedy: true,
11 alias: 'extracted-comment'
12 },
13 {
14 pattern: /#:.*/,
15 greedy: true,
16 alias: 'reference-comment'
17 },
18 {
19 pattern: /#,.*/,
20 greedy: true,
21 alias: 'flag-comment'
22 },
23 {
24 pattern: /#\|.*/,
25 greedy: true,
26 alias: 'previously-untranslated-comment'
27 },
28 {
29 pattern: /#.*/,
30 greedy: true
31 },
32 ],
33 'string': {
34 pattern: /(^|[^\\])"(?:[^"\\]|\\.)*"/,
35 lookbehind: true,
36 greedy: true
37 },
38 'keyword': /^msg(?:ctxt|id|id_plural|str)\b/m,
39 'number': /\b\d+\b/,
40 'punctuation': /[\[\]]/
41};
42
43Prism.languages.po = Prism.languages.gettext;