Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(37)

Side by Side Diff: lib/src/prism/components/prism-crystal.js

Issue 1418513006: update elements and fix some bugs (Closed) Base URL: git@github.com:dart-lang/polymer_elements.git@master
Patch Set: code review updates Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 (function(Prism) {
2 Prism.languages.crystal = Prism.languages.extend('ruby', {
3 keyword: [
4 /\b(?:abstract|alias|as|asm|begin|break|case|class|def|d o|else|elsif|end|ensure|enum|extend|for|fun|if|ifdef|include|instance_sizeof|lib |macro|module|next|of|out|pointerof|private|protected|rescue|return|require|self |sizeof|struct|super|then|type|typeof|union|unless|until|when|while|with|yield|_ _DIR__|__FILE__|__LINE__)\b/,
5 {
6 pattern: /(\.\s*)(?:is_a|responds_to)\?/,
7 lookbehind: true
8 }
9 ],
10
11 number: /\b(?:0b[01_]*[01]|0o[0-7_]*[0-7]|0x[0-9a-fA-F_]*[0-9a-f A-F]|(?:[0-9](?:[0-9_]*[0-9])?)(?:\.[0-9_]*[0-9])?(?:[eE][+-]?[0-9_]*[0-9])?)(?: _(?:[uif](?:8|16|32|64))?)?\b/,
12 });
13
14 var rest = Prism.util.clone(Prism.languages.crystal);
15
16 Prism.languages.insertBefore('crystal', 'string', {
17 attribute: {
18 pattern: /@\[.+?\]/,
19 alias: 'attr-name',
20 inside: {
21 delimiter: {
22 pattern: /^@\[|\]$/,
23 alias: 'tag'
24 },
25 rest: rest
26 }
27 },
28
29 expansion: [
30 {
31 pattern: /\{\{.+?\}\}/,
32 inside: {
33 delimiter: {
34 pattern: /^\{\{|\}\}$/,
35 alias: 'tag'
36 },
37 rest: rest
38 }
39 },
40 {
41 pattern: /\{%.+?%\}/,
42 inside: {
43 delimiter: {
44 pattern: /^\{%|%\}$/,
45 alias: 'tag'
46 },
47 rest: rest
48 }
49 }
50 ]
51 });
52
53 }(Prism));
OLDNEW
« no previous file with comments | « lib/src/prism/components/prism-core.min.js ('k') | lib/src/prism/components/prism-crystal.min.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698