Fixes #626.
Showing the changes to assets/javascripts (3 of 7 files). Show all
Unified · Split
| @@ -230,7 +230,7 @@ credits = [ · 229 unmodified lines | ||
| 230 | 230 | 'https://raw.githubusercontent.com/elixir-lang/elixir/master/LICENSE' |
| 231 | 231 | ], [ |
| 232 | 232 | 'Erlang', |
| 233 | − '1999-2016 Ericsson AB', | |
| 233 | + '2010-2017 Ericsson AB', | |
| 234 | 234 | 'Apache', |
| 235 | 235 | 'https://raw.githubusercontent.com/erlang/otp/maint/LICENSE.txt' |
| 236 | 236 | ], [ |
| @@ -1066,6 +1066,50 @@ Prism.languages.elixir.string.forEach(function(o) { · 1065 unmodified lines | ||
| 1066 | 1066 | }); |
| 1067 | 1067 | |
| 1068 | 1068 | |
| 1069 | +Prism.languages.erlang = { | |
| 1070 | + 'comment': /%.+/, | |
| 1071 | + 'string': { | |
| 1072 | + pattern: /"(?:\\?.)*?"/, | |
| 1073 | + greedy: true | |
| 1074 | + }, | |
| 1075 | + 'quoted-function': { | |
| 1076 | + pattern: /'(?:\\.|[^'\\])+'(?=\()/, | |
| 1077 | + alias: 'function' | |
| 1078 | + }, | |
| 1079 | + 'quoted-atom': { | |
| 1080 | + pattern: /'(?:\\.|[^'\\])+'/, | |
| 1081 | + alias: 'atom' | |
| 1082 | + }, | |
| 1083 | + 'boolean': /\b(?:true|false)\b/, | |
| 1084 | + 'keyword': /\b(?:fun|when|case|of|end|if|receive|after|try|catch)\b/, | |
| 1085 | + 'number': [ | |
| 1086 | + /\$\\?./, | |
| 1087 | + /\d+#[a-z0-9]+/i, | |
| 1088 | + /(?:\b|-)\d*\.?\d+([Ee][+-]?\d+)?\b/ | |
| 1089 | + ], | |
| 1090 | + 'function': /\b[a-z][\w@]*(?=\()/, | |
| 1091 | + 'variable': { | |
| 1092 | + // Look-behind is used to prevent wrong highlighting of atoms containing "@" | |
| 1093 | + pattern: /(^|[^@])(?:\b|\?)[A-Z_][\w@]*/, | |
| 1094 | + lookbehind: true | |
| 1095 | + }, | |
| 1096 | + 'operator': [ | |
| 1097 | + /[=\/<>:]=|=[:\/]=|\+\+?|--?|[=*\/!]|\b(?:bnot|div|rem|band|bor|bxor|bsl|bsr|not|and|or|xor|orelse|andalso)\b/, | |
| 1098 | + { | |
| 1099 | + // We don't want to match << | |
| 1100 | + pattern: /(^|[^<])<(?!<)/, | |
| 1101 | + lookbehind: true | |
| 1102 | + }, | |
| 1103 | + { | |
| 1104 | + // We don't want to match >> | |
| 1105 | + pattern: /(^|[^>])>(?!>)/, | |
| 1106 | + lookbehind: true | |
| 1107 | + } | |
| 1108 | + ], | |
| 1109 | + 'atom': /\b[a-z][\w@]*/, | |
| 1110 | + 'punctuation': /[()[\]{}:;,.#|]|<<|>>/ | |
| 1111 | + | |
| 1112 | +}; | |
| 1069 | 1113 | Prism.languages.go = Prism.languages.extend('clike', { |
| 1070 | 1114 | 'keyword': /\b(break|case|chan|const|continue|default|defer|else|fallthrough|for|func|go(to)?|if|import|interface|map|package|range|return|select|struct|switch|type|var)\b/, |
| 1071 | 1115 | 'builtin': /\b(bool|byte|complex(64|128)|error|float(32|64)|rune|string|u?int(8|16|32|64|)|uintptr|append|cap|close|complex|copy|delete|imag|len|make|new|panic|print(ln)?|real|recover)\b/, |
| @@ -24,6 +24,7 @@ app.views.DockerPage = · 23 unmodified lines | ||
| 24 | 24 | app.views.DrupalPage = |
| 25 | 25 | app.views.ElixirPage = |
| 26 | 26 | app.views.EmberPage = |
| 27 | +app.views.ErlangPage = | |
| 27 | 28 | app.views.ExpressPage = |
| 28 | 29 | app.views.FlowPage = |
| 29 | 30 | app.views.GoPage = |