Skip to content

Scala3doc: fix syntax highlighting #10934

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Dec 28, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions scala3doc/resources/dotty_res/scripts/hljs-scala3.js
Original file line number Diff line number Diff line change
Expand Up @@ -255,11 +255,11 @@ function highlightDotty(hljs) {
]
}

// Given instances (for the soft keyword 'as')
// Given instances
const GIVEN = {
begin: /given/, end: /[=;\n]/,
excludeEnd: true,
keywords: 'as given using',
keywords: 'given using with',
contains: [
hljs.C_LINE_COMMENT_MODE,
hljs.C_BLOCK_COMMENT_MODE,
Expand Down Expand Up @@ -316,8 +316,8 @@ function highlightDotty(hljs) {

const CLASS = {
className: 'class',
begin: `((${modifiers}|open|case) +)*class|trait|enum|object|package object`, end: templateDeclEnd,
keywords: withSoftKeywords('open'),
begin: `((${modifiers}|open|case|transparent) +)*(class|trait|enum|object|package object)`, end: templateDeclEnd,
keywords: withSoftKeywords('open transparent'),
contains: [
hljs.C_LINE_COMMENT_MODE,
hljs.C_BLOCK_COMMENT_MODE,
Expand Down
8 changes: 4 additions & 4 deletions scala3doc/scala3-docs/css/color-brewer.css
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,14 @@ Ported by Fabrício Tavares de Oliveira
color: #000;
}

.hljs-string,
/*.hljs-string,
.hljs-meta,
.hljs-symbol,
.hljs-template-tag,
.hljs-template-variable,
.hljs-addition {
color: #756bb1;
}
}*/

.hljs-comment,
.hljs-quote {
Expand All @@ -42,7 +42,7 @@ Ported by Fabrício Tavares de Oliveira
color: #88f;
}

.hljs-keyword,
/*.hljs-keyword,
.hljs-selector-tag,
.hljs-title,
.hljs-section,
Expand All @@ -55,7 +55,7 @@ Ported by Fabrício Tavares de Oliveira
.hljs-selector-class,
.hljs-strong {
color: #3182bd;
}
}*/

.hljs-emphasis {
font-style: italic;
Expand Down