Skip to content

Commit 7c819b6

Browse files
authored
Merge branch 'main' into leaf-bug
2 parents ef866f2 + 98b649f commit 7c819b6

23 files changed

+112
-18
lines changed

CHANGES.md

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,18 @@
11
## Version 11.11.2
22

3+
Themes:
4+
5+
- added "vs Dark " theme [Twineee1][]
6+
37
New Grammars:
48

59
- added 3rd party Aiken grammar to SUPPORTED_LANGUAGES [Josh Marchand][]
610
- added 3rd party VoltScript grammar to SUPPORTED_LANGUAGES [Chester Moses][]
711
- added 3rd party Prisma grammar to SUPPORTED_LANGUAGES [SungHyun Kim][]
812
- added 3rd party Magik grammar to SUPPORTED_LANGUAGES [Sebastiaan Speck][]
913
- added 3rd party Gleam grammar to SUPPORTED_LANGUAGES [Filip Hoffmann][]
14+
- added 3rd party L4 grammar to SUPPORTED_LANGUAGES [Thomas Gorissen][]
15+
- added 3rd party Bicep grammar to SUPPORTED_LANGUAGES [Anthony Martin][]
1016

1117
Core Grammars:
1218

@@ -18,11 +24,17 @@ Core Grammars:
1824
- enh(php) support single line and hash comments in attributes, constructor and functions [Antoine Musso][]
1925
- fix(leaf) fix bug in Leaf keyword highlighting [Francesco Paolo Severino][]
2026
- enh(json) add json5 support [Kerry Shetline][]
27+
- fix(css) `unicode-range` parsing, issue #4253 [Kerry Shetline][]
28+
- fix(csharp) Support digit separators [te-ing][]
2129

2230
Documentation:
2331

2432
- alphabetized languages + upper-cased BASIC in SUPPORTED_LANGUAGES.md [Adam Lui][]
2533

34+
Themes:
35+
36+
- Fix: cybertopia themes render correctly in shadow DOM [hbgl][]
37+
2638
CONTRIBUTORS
2739

2840
[Josh Marchand]: https://github.com/yHSJ
@@ -33,11 +45,17 @@ CONTRIBUTORS
3345
[Antoine Musso]: https://github.com/hashar
3446
[Chester Moses]: https://github.com/Chester-Moses-HCL
3547
[Francesco Paolo Severino]: https://github.com/fpseverino
48+
[Kerry Shetline]: https://github.com/kshetline
3649
[SungHyun Kim]: https://github.com/witch-factory
3750
[Adam Lui]: https://github.com/adamlui
3851
[Sebastiaan Speck]: https://github.com/sebastiaanspeck
3952
[Filip Hoffmann]: https://github.com/folospior
40-
[Kerry Shetline]: https://github.com/kshetline
53+
[Twineee1]: https://github.com/Twineee1
54+
[hbgl]: https://github.com/hbgl
55+
[Thomas Gorissen]: https://github.com/serrynaimo
56+
[te-ing]: https://github.com/te-ing
57+
[Anthony Martin]: https://github.com/anthony-c-martin
58+
4159

4260
## Version 11.11.1
4361

SUPPORTED_LANGUAGES.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ The table below shows the full list of languages (and corresponding classes/alia
3434
| Bash | bash, sh, zsh | |
3535
| BASIC | basic | |
3636
| BBCode | bbcode | [highlightjs-bbcode](https://github.com/RedGuy12/highlightjs-bbcode) |
37+
| Bicep | bicep | [highlightjs-bicep](https://github.com/Azure/bicep/blob/main/docs/highlighting.md#highlightjs) |
3738
| Blade (Laravel) | blade | [highlightjs-blade](https://github.com/miken32/highlightjs-blade) |
3839
| BNF | bnf | |
3940
| BQN | bqn | [highlightjs-bqn](https://github.com/razetime/highlightjs-bqn) |
@@ -123,6 +124,7 @@ The table below shows the full list of languages (and corresponding classes/alia
123124
| Julia | julia, jl | |
124125
| Julia REPL | julia-repl | |
125126
| Kotlin | kotlin, kt | |
127+
| L4 | l4, legal | [highlightjs-l4](https://github.com/legalese/highlightjs-l4)
126128
| Lang | | [highlightjs-lang](https://github.com/highlightjs/highlightjs-lang)
127129
| Lasso | lasso, ls, lassoscript | |
128130
| LaTeX | tex | |

src/languages/csharp.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ export default function(hljs) {
166166
variants: [
167167
{ begin: '\\b(0b[01\']+)' },
168168
{ begin: '(-?)\\b([\\d\']+(\\.[\\d\']*)?|\\.[\\d\']+)(u|U|l|L|ul|UL|f|F|b|B)' },
169-
{ begin: '(-?)(\\b0[xX][a-fA-F0-9\']+|(\\b[\\d\']+(\\.[\\d\']*)?|\\.[\\d\']+)([eE][-+]?[\\d\']+)?)' }
169+
{ begin: '(-?)(\\b0[xX][a-fA-F0-9\'_]+|(\\b[\\d\'_]+(\\.[\\d\'_]*)?|\\.[\\d\'_]+)([eE][-+]?[\\d\'_]+)?)' }
170170
],
171171
relevance: 0
172172
};

src/languages/css.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,9 +73,10 @@ export default function(hljs) {
7373
modes.HEXCOLOR,
7474
modes.IMPORTANT,
7575
modes.CSS_NUMBER_MODE,
76+
modes.UNICODE_RANGE,
7677
...STRINGS,
7778
// needed to highlight these as strings and to avoid issues with
78-
// illegal characters that might be inside urls that would tigger the
79+
// illegal characters that might be inside urls that would trigger the
7980
// languages illegal stack
8081
{
8182
begin: /(url|data-uri)\(/,

src/languages/less.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ export default function(hljs) {
6767
excludeEnd: true
6868
}
6969
},
70+
modes.UNICODE_RANGE,
7071
modes.HEXCOLOR,
7172
PARENS_MODE,
7273
IDENT_MODE('variable', '@@?' + IDENT_RE, 10),
@@ -177,7 +178,7 @@ export default function(hljs) {
177178
MIXIN_GUARD_MODE,
178179
IDENT_MODE('keyword', 'all\\b'),
179180
IDENT_MODE('variable', '@\\{' + IDENT_RE + '\\}'), // otherwise it’s identified as tag
180-
181+
181182
{
182183
begin: '\\b(' + css.TAGS.join('|') + ')\\b',
183184
className: 'selector-tag'

src/languages/lib/css-shared.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@ export const MODES = (hljs) => {
99
scope: 'number',
1010
begin: /#(([0-9a-fA-F]{3,4})|(([0-9a-fA-F]{2}){3,4}))\b/
1111
},
12+
UNICODE_RANGE: {
13+
scope: 'number',
14+
begin: /\b[Uu]\+[0-9A-Fa-f][0-9A-Fa-f?]{0,4}(-[0-9A-Fa-f][0-9A-Fa-f]{0,4})?/
15+
},
1216
FUNCTION_DISPATCH: {
1317
className: "built_in",
1418
begin: /[\w-]+(?=\()/
@@ -777,6 +781,7 @@ export const ATTRIBUTES = [
777781
'transition-timing-function',
778782
'translate',
779783
'unicode-bidi',
784+
'unicode-range',
780785
'user-modify',
781786
'user-select',
782787
'vector-effect',

src/languages/scss.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@ export default function(hljs) {
7979
VARIABLE,
8080
modes.HEXCOLOR,
8181
modes.CSS_NUMBER_MODE,
82+
modes.UNICODE_RANGE,
8283
hljs.QUOTE_STRING_MODE,
8384
hljs.APOS_STRING_MODE,
8485
modes.IMPORTANT,

src/languages/stylus.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,7 @@ export default function(hljs) {
148148
VARIABLE,
149149
hljs.APOS_STRING_MODE,
150150
modes.CSS_NUMBER_MODE,
151+
modes.UNICODE_RANGE,
151152
hljs.QUOTE_STRING_MODE
152153
]
153154
}

src/styles/cybertopia-cherry.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
Repository: https://github.com/noraj/cybertopia-highlightjs
55
*/
66

7-
:root {
7+
:root, :host {
88
--hljs-bg: #101010;
99
--hljs-mono-1: #abb2bf;
1010
--hljs-mono-3: #5c6370;

src/styles/cybertopia-dimmer.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
Repository: https://github.com/noraj/cybertopia-highlightjs
55
*/
66

7-
:root {
7+
:root, :host {
88
--hljs-bg: #101010;
99
--hljs-mono-1: #abb2bf;
1010
--hljs-mono-3: #5c6370;

src/styles/cybertopia-icecap.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
Repository: https://github.com/noraj/cybertopia-highlightjs
55
*/
66

7-
:root {
7+
:root, :host {
88
--hljs-bg: #101010;
99
--hljs-mono-1: #abb2bf;
1010
--hljs-mono-3: #5c6370;

src/styles/cybertopia-saturated.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
Repository: https://github.com/noraj/cybertopia-highlightjs
55
*/
66

7-
:root {
7+
:root, :host {
88
--hljs-bg: #101010;
99
--hljs-mono-1: #abb2bf;
1010
--hljs-mono-3: #5c6370;

src/styles/vs-dark.css

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
/*
2+
3+
VS Dark theme based off the theme distributed with the Monaco editor by Twineee <[email protected]>
4+
5+
*/
6+
.hljs {
7+
background: #202020;
8+
color: #CCCCCC;
9+
}
10+
11+
.hljs-comment,
12+
.hljs-doctag,
13+
.hljs-quote,
14+
.hljs-variable {
15+
color: #6A9954;
16+
}
17+
18+
.hljs-keyword,
19+
.hljs-selector-tag,
20+
.hljs-built_in,
21+
.hljs-name,
22+
.hljs-tag {
23+
color: #579CD6;
24+
}
25+
26+
.hljs-string,
27+
.hljs-title,
28+
.hljs-section,
29+
.hljs-attribute,
30+
.hljs-literal,
31+
.hljs-template-tag,
32+
.hljs-template-variable,
33+
.hljs-type,
34+
.hljs-addition {
35+
color: #CE9178;
36+
}
37+
38+
.hljs-deletion,
39+
.hljs-selector-attr,
40+
.hljs-selector-pseudo,
41+
.hljs-meta {
42+
color: #D4D4D4;
43+
}
44+
45+
.hljs-attr {
46+
color: #9DDCFE;
47+
}
48+
49+
.hljs-symbol,
50+
.hljs-bullet,
51+
.hljs-link {
52+
color: #00b0e8;
53+
}
54+
55+
56+
.hljs-emphasis {
57+
font-style: italic;
58+
}
59+
60+
.hljs-strong {
61+
font-weight: bold;
62+
}

test/markup/csharp/floats.expect.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
<span class="hljs-built_in">float</span> test = <span class="hljs-number">1.0f</span>;
22
<span class="hljs-built_in">float</span> test2 = <span class="hljs-number">1.f</span>;
33
<span class="hljs-built_in">float</span> test3 = <span class="hljs-number">1.0</span>;
4-
<span class="hljs-built_in">float</span> test4 = <span class="hljs-number">1</span>;
4+
<span class="hljs-built_in">float</span> test4 = <span class="hljs-number">1</span>;
5+
<span class="hljs-built_in">float</span> test5 = <span class="hljs-number">1_000</span>;
6+

test/markup/csharp/floats.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
float test = 1.0f;
22
float test2 = 1.f;
33
float test3 = 1.0;
4-
float test4 = 1;
4+
float test4 = 1;
5+
float test5 = 1_000;

test/markup/css/css_consistency.expect.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@
5454
<span class="hljs-attribute">font-variant</span>: no-common-ligatures proportional-nums;
5555
<span class="hljs-attribute">font-feature-settings</span>: <span class="hljs-string">&quot;liga&quot;</span> <span class="hljs-number">0</span>;
5656
<span class="hljs-attribute">font-variation-settings</span>: <span class="hljs-string">&quot;xhgt&quot;</span> <span class="hljs-number">0.7</span>;
57-
<span class="hljs-comment">/* unicode-range: U+0025-00FF, U+4??; */</span>
57+
<span class="hljs-attribute">unicode-range</span>: <span class="hljs-number">U+0025-00FF</span>, <span class="hljs-number">U+4??</span>;
5858
<span class="hljs-comment">/* it&#x27;s not 100% clear how url and format should be highlighted universally */</span>
5959
<span class="hljs-comment">/* src: url(&quot;/fonts/OpenSans-Regular-webfont.woff2&quot;) format(&quot;woff2&quot;),
6060
url(&quot;/fonts/OpenSans-Regular-webfont.woff&quot;) format(&quot;woff&quot;); */</span>

test/markup/css/css_consistency.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ a[href*="example"] {}
5454
font-variant: no-common-ligatures proportional-nums;
5555
font-feature-settings: "liga" 0;
5656
font-variation-settings: "xhgt" 0.7;
57-
/* unicode-range: U+0025-00FF, U+4??; */
57+
unicode-range: U+0025-00FF, U+4??;
5858
/* it's not 100% clear how url and format should be highlighted universally */
5959
/* src: url("/fonts/OpenSans-Regular-webfont.woff2") format("woff2"),
6060
url("/fonts/OpenSans-Regular-webfont.woff") format("woff"); */

test/markup/less/css_consistency.expect.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@
5454
<span class="hljs-attribute">font-variant</span>: no-common-ligatures proportional-nums;
5555
<span class="hljs-attribute">font-feature-settings</span>: <span class="hljs-string">&quot;liga&quot;</span> <span class="hljs-number">0</span>;
5656
<span class="hljs-attribute">font-variation-settings</span>: <span class="hljs-string">&quot;xhgt&quot;</span> <span class="hljs-number">0.7</span>;
57-
<span class="hljs-comment">/* unicode-range: U+0025-00FF, U+4??; */</span>
57+
<span class="hljs-attribute">unicode-range</span>: <span class="hljs-number">U+0025-00FF</span>, <span class="hljs-number">U+4??</span>;
5858
<span class="hljs-comment">/* it&#x27;s not 100% clear how url and format should be highlighted universally */</span>
5959
<span class="hljs-comment">/* src: url(&quot;/fonts/OpenSans-Regular-webfont.woff2&quot;) format(&quot;woff2&quot;),
6060
url(&quot;/fonts/OpenSans-Regular-webfont.woff&quot;) format(&quot;woff&quot;); */</span>

test/markup/less/css_consistency.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ a[href*="example"] {}
5454
font-variant: no-common-ligatures proportional-nums;
5555
font-feature-settings: "liga" 0;
5656
font-variation-settings: "xhgt" 0.7;
57-
/* unicode-range: U+0025-00FF, U+4??; */
57+
unicode-range: U+0025-00FF, U+4??;
5858
/* it's not 100% clear how url and format should be highlighted universally */
5959
/* src: url("/fonts/OpenSans-Regular-webfont.woff2") format("woff2"),
6060
url("/fonts/OpenSans-Regular-webfont.woff") format("woff"); */

test/markup/scss/css_consistency.expect.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@
5454
<span class="hljs-attribute">font-variant</span>: no-common-ligatures proportional-nums;
5555
<span class="hljs-attribute">font-feature-settings</span>: <span class="hljs-string">&quot;liga&quot;</span> <span class="hljs-number">0</span>;
5656
<span class="hljs-attribute">font-variation-settings</span>: <span class="hljs-string">&quot;xhgt&quot;</span> <span class="hljs-number">0.7</span>;
57-
<span class="hljs-comment">/* unicode-range: U+0025-00FF, U+4??; */</span>
57+
<span class="hljs-attribute">unicode-range</span>: <span class="hljs-number">U+0025-00FF</span>, <span class="hljs-number">U+4??</span>;
5858
<span class="hljs-comment">/* it&#x27;s not 100% clear how url and format should be highlighted universally */</span>
5959
<span class="hljs-comment">/* src: url(&quot;/fonts/OpenSans-Regular-webfont.woff2&quot;) format(&quot;woff2&quot;),
6060
url(&quot;/fonts/OpenSans-Regular-webfont.woff&quot;) format(&quot;woff&quot;); */</span>

test/markup/scss/css_consistency.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ a[href*="example"] {}
5454
font-variant: no-common-ligatures proportional-nums;
5555
font-feature-settings: "liga" 0;
5656
font-variation-settings: "xhgt" 0.7;
57-
/* unicode-range: U+0025-00FF, U+4??; */
57+
unicode-range: U+0025-00FF, U+4??;
5858
/* it's not 100% clear how url and format should be highlighted universally */
5959
/* src: url("/fonts/OpenSans-Regular-webfont.woff2") format("woff2"),
6060
url("/fonts/OpenSans-Regular-webfont.woff") format("woff"); */

test/markup/stylus/css_consistency.expect.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@
5454
<span class="hljs-attribute">font-variant</span>: no-common-ligatures proportional-nums;
5555
<span class="hljs-attribute">font-feature-settings</span>: <span class="hljs-string">&quot;liga&quot;</span> <span class="hljs-number">0</span>;
5656
<span class="hljs-attribute">font-variation-settings</span>: <span class="hljs-string">&quot;xhgt&quot;</span> <span class="hljs-number">0.7</span>;
57-
<span class="hljs-comment">/* unicode-range: U+0025-00FF, U+4??; */</span>
57+
<span class="hljs-attribute">unicode-range</span>: U+<span class="hljs-number">0025</span>-<span class="hljs-number">00</span>FF, U+<span class="hljs-number">4</span>??;
5858
<span class="hljs-comment">/* it&#x27;s not 100% clear how url and format should be highlighted universally */</span>
5959
<span class="hljs-comment">/* src: url(&quot;/fonts/OpenSans-Regular-webfont.woff2&quot;) format(&quot;woff2&quot;),
6060
url(&quot;/fonts/OpenSans-Regular-webfont.woff&quot;) format(&quot;woff&quot;); */</span>

test/markup/stylus/css_consistency.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ a[href*="example"] {}
5454
font-variant: no-common-ligatures proportional-nums;
5555
font-feature-settings: "liga" 0;
5656
font-variation-settings: "xhgt" 0.7;
57-
/* unicode-range: U+0025-00FF, U+4??; */
57+
unicode-range: U+0025-00FF, U+4??;
5858
/* it's not 100% clear how url and format should be highlighted universally */
5959
/* src: url("/fonts/OpenSans-Regular-webfont.woff2") format("woff2"),
6060
url("/fonts/OpenSans-Regular-webfont.woff") format("woff"); */

0 commit comments

Comments
 (0)