File tree Expand file tree Collapse file tree 5 files changed +14
-0
lines changed
Expand file tree Collapse file tree 5 files changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -10,6 +10,7 @@ Core Grammars:
1010- fix(javascript) correctly highlight 'for await' again [ wolfgang42] [ ]
1111- enh(csp) add missing directives / keywords from MDN (7 more) [ Max Liashuk] [ ]
1212- 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] [ ]
1314- fix(diff) fix unified diff hunk header regex to allow unpaired numbers [ Chris Wilson] [ ]
1415- enh(php) support single line and hash comments in attributes, constructor and functions [ Antoine Musso] [ ]
1516
@@ -18,6 +19,7 @@ CONTRIBUTORS
1819[ Josh Marchand ] : https://github.com/yHSJ
1920[ Max Liashuk ] : https://github.com/probil
2021[ Max Reznik ] : https://github.com/reznikmm
22+ [ Kevin Bloch ] : https://github.com/codingthat
2123[ Chris Wilson ] : https://github.com/sushicw
2224[ Antoine Musso ] : https://github.com/hashar
2325[ 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) {
2020 "cond" ,
2121 "defstruct" ,
2222 "defguard" ,
23+ "defguardp" ,
2324 "do" ,
2425 "else" ,
2526 "end" ,
@@ -228,7 +229,13 @@ export default function(hljs) {
228229 beginKeywords : 'defimpl defmodule defprotocol defrecord' ,
229230 end : / \b d o \b | $ | ; /
230231 } ) ;
232+ const CHAR_LITERAL = {
233+ scope : 'string' ,
234+ match : / \? ' / ,
235+ relevance : 0
236+ } ;
231237 const ELIXIR_DEFAULT_CONTAINS = [
238+ CHAR_LITERAL ,
232239 STRING ,
233240 REGEX_SIGIL ,
234241 UPCASE_SIGIL ,
Original file line number Diff line number Diff line change @@ -10,6 +10,7 @@ guy = Person.new first_name: "Guy"
1010guy.name
1111
1212defmodule ListServer do
13+ defguardp apostrophe?(c) when c == ?'
1314 @moduledoc """
1415 This module provides an easy to use ListServer, useful for keeping
1516 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