Skip to content

Commit 51407b8

Browse files
authored
Merge pull request #10934 from dotty-staging/scala3doc/fix-hl
Scala3doc: fix syntax highlighting
2 parents 1ab80f7 + c0fb683 commit 51407b8

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

scala3doc/resources/dotty_res/scripts/hljs-scala3.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -255,11 +255,11 @@ function highlightDotty(hljs) {
255255
]
256256
}
257257

258-
// Given instances (for the soft keyword 'as')
258+
// Given instances
259259
const GIVEN = {
260260
begin: /given/, end: /[=;\n]/,
261261
excludeEnd: true,
262-
keywords: 'as given using',
262+
keywords: 'given using with',
263263
contains: [
264264
hljs.C_LINE_COMMENT_MODE,
265265
hljs.C_BLOCK_COMMENT_MODE,
@@ -316,8 +316,8 @@ function highlightDotty(hljs) {
316316

317317
const CLASS = {
318318
className: 'class',
319-
begin: `((${modifiers}|open|case) +)*class|trait|enum|object|package object`, end: templateDeclEnd,
320-
keywords: withSoftKeywords('open'),
319+
begin: `((${modifiers}|open|case|transparent) +)*(class|trait|enum|object|package object)`, end: templateDeclEnd,
320+
keywords: withSoftKeywords('open transparent'),
321321
contains: [
322322
hljs.C_LINE_COMMENT_MODE,
323323
hljs.C_BLOCK_COMMENT_MODE,

scala3doc/scala3-docs/css/color-brewer.css

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,14 @@ Ported by Fabrício Tavares de Oliveira
1515
color: #000;
1616
}
1717

18-
.hljs-string,
18+
/*.hljs-string,
1919
.hljs-meta,
2020
.hljs-symbol,
2121
.hljs-template-tag,
2222
.hljs-template-variable,
2323
.hljs-addition {
2424
color: #756bb1;
25-
}
25+
}*/
2626

2727
.hljs-comment,
2828
.hljs-quote {
@@ -42,7 +42,7 @@ Ported by Fabrício Tavares de Oliveira
4242
color: #88f;
4343
}
4444

45-
.hljs-keyword,
45+
/*.hljs-keyword,
4646
.hljs-selector-tag,
4747
.hljs-title,
4848
.hljs-section,
@@ -55,7 +55,7 @@ Ported by Fabrício Tavares de Oliveira
5555
.hljs-selector-class,
5656
.hljs-strong {
5757
color: #3182bd;
58-
}
58+
}*/
5959

6060
.hljs-emphasis {
6161
font-style: italic;

0 commit comments

Comments
 (0)