File tree 5 files changed +14
-0
lines changed
5 files changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -10,6 +10,7 @@ Core Grammars:
10
10
- fix(javascript) correctly highlight 'for await' again [ wolfgang42] [ ]
11
11
- enh(csp) add missing directives / keywords from MDN (7 more) [ Max Liashuk] [ ]
12
12
- enh(ada) add new ` parallel ` keyword, allow ` [] ` for Ada 2022 [ Max Reznik] [ ]
13
+ - fix(ex) adds support for ` ?' ` char literal and missing ` defguardp ` keyword [ Kevin Bloch] [ ]
13
14
- fix(diff) fix unified diff hunk header regex to allow unpaired numbers [ Chris Wilson] [ ]
14
15
- enh(php) support single line and hash comments in attributes, constructor and functions [ Antoine Musso] [ ]
15
16
- fix(rust) ensure brackets are balanced within attributes [ ewwwin] [ ]
@@ -19,6 +20,7 @@ CONTRIBUTORS
19
20
[ Josh Marchand ] : https://github.com/yHSJ
20
21
[ Max Liashuk ] : https://github.com/probil
21
22
[ Max Reznik ] : https://github.com/reznikmm
23
+ [ Kevin Bloch ] : https://github.com/codingthat
22
24
[ Chris Wilson ] : https://github.com/sushicw
23
25
[ Antoine Musso ] : https://github.com/hashar
24
26
[ Chester Moses ] : https://github.com/Chester-Moses-HCL
Original file line number Diff line number Diff line change @@ -20,6 +20,7 @@ export default function(hljs) {
20
20
"cond" ,
21
21
"defstruct" ,
22
22
"defguard" ,
23
+ "defguardp" ,
23
24
"do" ,
24
25
"else" ,
25
26
"end" ,
@@ -228,7 +229,13 @@ export default function(hljs) {
228
229
beginKeywords : 'defimpl defmodule defprotocol defrecord' ,
229
230
end : / \b d o \b | $ | ; /
230
231
} ) ;
232
+ const CHAR_LITERAL = {
233
+ scope : 'string' ,
234
+ match : / \? ' / ,
235
+ relevance : 0
236
+ } ;
231
237
const ELIXIR_DEFAULT_CONTAINS = [
238
+ CHAR_LITERAL ,
232
239
STRING ,
233
240
REGEX_SIGIL ,
234
241
UPCASE_SIGIL ,
Original file line number Diff line number Diff line change @@ -10,6 +10,7 @@ guy = Person.new first_name: "Guy"
10
10
guy.name
11
11
12
12
defmodule ListServer do
13
+ defguardp apostrophe?(c) when c == ?'
13
14
@moduledoc """
14
15
This module provides an easy to use ListServer, useful for keeping
15
16
lists of things.
Original file line number Diff line number Diff line change
1
+ <span class="hljs-keyword">defguardp</span> apostrophe?(c) <span class="hljs-keyword">when</span> c == <span class="hljs-string">?'</span>
2
+ <span class="hljs-keyword">defguardp</span> upper?(c) <span class="hljs-keyword">when</span> (c >= ?A <span class="hljs-keyword">and</span> c <= ?Z)
Original file line number Diff line number Diff line change
1
+ defguardp apostrophe?(c) when c == ?'
2
+ defguardp upper?(c) when (c >= ?A and c <= ?Z)
You can’t perform that action at this time.
0 commit comments