File tree 3 files changed +20
-7
lines changed
3 files changed +20
-7
lines changed Original file line number Diff line number Diff line change @@ -13,12 +13,14 @@ Language Improvements:
13
13
- fix(javascript) Comments inside params should be highlighted (#2702 ) [ Josh Goebel] [ ]
14
14
- fix(scala) Comments inside class header should be highlighted (#1559 ) [ Josh Goebel] [ ]
15
15
- fix(c-like) Correctly highlight modifiers (` final ` ) in class declaration (#2696 ) [ Josh Goebel] [ ]
16
+ - enh(angelscript) Improve heredocs, numbers, metadata blocks (#2724 ) [ Melissa Geels] [ ]
16
17
17
18
[ David Pine ] : https://github.com/IEvangelist
18
19
[ Josh Goebel ] : https://github.com/joshgoebel
19
20
[ Ryan Jonasson ] : https://github.com/ryanjonasson
20
21
[ Philipp Engel ] : https://github.com/interkosmos
21
22
[ Konrad Rudolph ] : https://github.com/klmr
23
+ [ Melissa Geels ] : https://github.com/codecat
22
24
23
25
24
26
## Version 10.2.1
Original file line number Diff line number Diff line change @@ -48,6 +48,12 @@ export default function(hljs) {
48
48
relevance : 0
49
49
} ,
50
50
51
+ // """heredoc strings"""
52
+ {
53
+ className : 'string' ,
54
+ begin : '"""' , end : '"""'
55
+ } ,
56
+
51
57
{ // "strings"
52
58
className : 'string' ,
53
59
begin : '"' , end : '"' ,
@@ -56,15 +62,14 @@ export default function(hljs) {
56
62
relevance : 0
57
63
} ,
58
64
59
- // """heredoc strings"""
60
- {
61
- className : 'string' ,
62
- begin : '"""' , end : '"""'
63
- } ,
64
-
65
65
hljs . C_LINE_COMMENT_MODE , // single-line comments
66
66
hljs . C_BLOCK_COMMENT_MODE , // comment blocks
67
67
68
+ { // metadata
69
+ className : 'string' ,
70
+ begin : '^\\s*\\[' , end : '\\]' ,
71
+ } ,
72
+
68
73
{ // interface or namespace declaration
69
74
beginKeywords : 'interface namespace' , end : '{' ,
70
75
illegal : '[;.\\-]' ,
@@ -108,7 +113,7 @@ export default function(hljs) {
108
113
109
114
{ // numbers
110
115
className : 'number' ,
111
- begin : '(-?)(\\b0[xX ][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?f?|\\.\\d+f?)([eE][-+]?\\d+f?)?)'
116
+ begin : '(-?)(\\b0[xXbBoOdD ][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?f?|\\.\\d+f?)([eE][-+]?\\d+f?)?)'
112
117
}
113
118
]
114
119
} ;
Original file line number Diff line number Diff line change @@ -25,11 +25,13 @@ namespace MyApplication
25
25
m_arr.insertLast(3.14159f);
26
26
uint x = 0x7fff0000;
27
27
int y = 9001;
28
+ uint z = 0b10101010;
28
29
}
29
30
30
31
int get_Thing() property { return m_thing; }
31
32
void set_Thing(int x) property { m_thing = x; }
32
33
34
+ [Hook x=1 y=2]
33
35
void DoSomething()
34
36
{
35
37
print("Something! " + 'stuff.');
@@ -54,3 +56,7 @@ void Main()
54
56
SomeClass@ c = SomeClass();
55
57
c.DoSomething();
56
58
}
59
+
60
+ string multilineString = """
61
+ Hello world, "this is a test"!
62
+ """;
You can’t perform that action at this time.
0 commit comments