File tree Expand file tree Collapse file tree 5 files changed +32
-2
lines changed Expand file tree Collapse file tree 5 files changed +32
-2
lines changed Original file line number Diff line number Diff line change @@ -34,6 +34,7 @@ Language Improvements:
34
34
- fix(yaml) Fix tags to include non-word characters (#2486 ) [ Peter Plantinga] [ ]
35
35
- fix(swift) ` @objcMembers ` was being partially highlighted (#2543 ) [ Nick Randall] [ ]
36
36
- enh(dart) Add ` late ` and ` required ` keywords, and ` Never ` built-in type (#2550 ) [ Sam Rawlins] [ ]
37
+ - enh(erlang) Add underscore separators to numeric literals (#2554 ) [ Sergey Prokhorov] [ ]
37
38
38
39
[ Josh Goebel ] : https://github.com/yyyc514
39
40
[ Peter Plantinga ] : https://github.com/pplantinga
@@ -42,6 +43,7 @@ Language Improvements:
42
43
[ Hankun Lin ] : https://github.com/Linhk1606
43
44
[ Nick Randall ] : https://github.com/nicked
44
45
[ Sam Rawlins ] : https://github.com/srawlins
46
+ [ Sergey Prokhorov ] : https://github.com/seriyps
45
47
46
48
47
49
## Version 10.0.2
Original file line number Diff line number Diff line change @@ -23,7 +23,7 @@ export default function(hljs) {
23
23
hljs . COMMENT ( '%' , '$' ) ,
24
24
{
25
25
className : 'number' ,
26
- begin : '\\b(\\d+#[a-fA-F0-9]+|\\d+(\\ .\\d+)?([eE][-+]?\\d+)?)' ,
26
+ begin : '\\b(\\d+(_\\d+)* #[a-fA-F0-9]+(_[a-fA-F0-9]+)* |\\d+(_\\d+)*(\\ .\\d+(_\\d+)* )?([eE][-+]?\\d+)?)' ,
27
27
relevance : 0
28
28
} ,
29
29
hljs . APOS_STRING_MODE ,
Original file line number Diff line number Diff line change @@ -20,7 +20,7 @@ export default function(hljs) {
20
20
var COMMENT = hljs . COMMENT ( '%' , '$' ) ;
21
21
var NUMBER = {
22
22
className : 'number' ,
23
- begin : '\\b(\\d+#[a-fA-F0-9]+|\\d+(\\ .\\d+)?([eE][-+]?\\d+)?)' ,
23
+ begin : '\\b(\\d+(_\\d+)* #[a-fA-F0-9]+(_[a-fA-F0-9]+)* |\\d+(_\\d+)*(\\ .\\d+(_\\d+)* )?([eE][-+]?\\d+)?)' ,
24
24
relevance : 0
25
25
} ;
26
26
var NAMED_FUN = {
Original file line number Diff line number Diff line change
1
+ Integer = <span class="hljs-number">1234</span>
2
+ BigInteger = <span class="hljs-number">1_234_000</span>
3
+ NegInteger = -<span class="hljs-number">20_000</span>
4
+ Float = <span class="hljs-number">2.34</span>
5
+ BigFloat = <span class="hljs-number">3_333.14159_26535_89793</span>
6
+ SciFloat = <span class="hljs-number">2.4e23</span>
7
+ PlusSciFloat = <span class="hljs-number">2.4e+23</span>
8
+ SmallSciFloat = <span class="hljs-number">2.4e-23</span>
9
+ Binary = <span class="hljs-number">2#1010</span>
10
+ StrangeBinary = <span class="hljs-number">2#1010_1010_1010</span>
11
+ Octal = <span class="hljs-number">8#777</span>
12
+ StrangeOctal = <span class="hljs-number">8#777_666_555</span>
13
+ Hex = <span class="hljs-number">16#1ABEF</span>
14
+ StrangeHex = <span class="hljs-number">16#1234_FACE_987D</span>
Original file line number Diff line number Diff line change
1
+ Integer = 1234
2
+ BigInteger = 1_234_000
3
+ NegInteger = -20_000
4
+ Float = 2.34
5
+ BigFloat = 3_333.14159_26535_89793
6
+ SciFloat = 2.4e23
7
+ PlusSciFloat = 2.4e+23
8
+ SmallSciFloat = 2.4e-23
9
+ Binary = 2#1010
10
+ StrangeBinary = 2#1010_1010_1010
11
+ Octal = 8#777
12
+ StrangeOctal = 8#777_666_555
13
+ Hex = 16#1ABEF
14
+ StrangeHex = 16#1234_FACE_987D
You can’t perform that action at this time.
0 commit comments