Skip to content

Commit 1728392

Browse files
committed
add support for java
1 parent af8b0ca commit 1728392

File tree

3 files changed

+15
-14
lines changed

3 files changed

+15
-14
lines changed

babel.config.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
[
88
"prismjs",
99
{
10-
"languages": ["js", "css", "yaml", "bash", "batch", "markup", "json", "powershell"],
10+
"languages": ["dockerfile", "java", "js", "css", "yaml", "bash", "batch", "markup", "json", "powershell"],
1111
"plugins": [],
1212
"css": false
1313
}

src/components/CodeBox/index.tsx

+1
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ interface Props {
1616
const replaceLabelLanguages = (language: string) =>
1717
language
1818
.replace(/powershell/i, 'pwsh')
19+
.replace(/dockerfile/i, 'docker')
1920
.toUpperCase();
2021

2122

src/components/CodeBox/light.module.scss

+13-13
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@
77
&.prolog,
88
&.doctype,
99
&.cdata {
10-
color: slategray;
10+
color: slategray;
1111
}
1212

1313
&.namespace {
14-
opacity: 0.7;
14+
opacity: 0.7;
1515
}
1616

1717
&.property,
@@ -21,57 +21,57 @@
2121
&.constant,
2222
&.symbol,
2323
&.deleted {
24-
color: #905;
24+
color: #905;
2525
}
2626

2727
&.selector,
2828
&.attr-name,
2929
&.char,
3030
&.builtin,
3131
&.inserted {
32-
color: #690;
32+
color: #690;
3333
}
3434

3535
&.entity,
3636
&.url {
37-
background: hsla(0deg, 0%, 100%, 50%);
38-
color: #9a6e3a;
37+
background: hsla(0deg, 0%, 100%, 50%);
38+
color: #9a6e3a;
3939
}
4040

4141
&.atrule,
4242
&.attr-value,
4343
&.keyword {
44-
color: #07a;
44+
color: #07a;
4545
}
4646

4747
&.function,
4848
&.class-name {
49-
color: #dd4a68;
49+
color: #dd4a68;
5050
}
5151

5252
&.regex,
5353
&.important,
5454
&.variable {
55-
color: #e90;
55+
color: #e90;
5656
}
5757

5858
&.important,
5959
&.bold {
60-
font-weight: var(--font-weight-vold);
60+
font-weight: var(--font-weight-vold);
6161
}
6262

6363
&.italic {
64-
font-style: italic;
64+
font-style: italic;
6565
}
6666

6767
&.entity {
68-
cursor: help;
68+
cursor: help;
6969
}
7070

7171
&.punctuation,
7272
&.operator,
7373
&.string {
74-
background-color: var(--black2);
74+
background-color: var(--black2);
7575
}
7676
}
7777
}

0 commit comments

Comments
 (0)