From 1728392a284e613c9b28acbd37645ea803768b3e Mon Sep 17 00:00:00 2001 From: George Adams Date: Wed, 18 Jan 2023 13:05:49 +0000 Subject: [PATCH] add support for java --- babel.config.json | 2 +- src/components/CodeBox/index.tsx | 1 + src/components/CodeBox/light.module.scss | 26 ++++++++++++------------ 3 files changed, 15 insertions(+), 14 deletions(-) diff --git a/babel.config.json b/babel.config.json index f5c23ea7fb..42c7797088 100644 --- a/babel.config.json +++ b/babel.config.json @@ -7,7 +7,7 @@ [ "prismjs", { - "languages": ["js", "css", "yaml", "bash", "batch", "markup", "json", "powershell"], + "languages": ["dockerfile", "java", "js", "css", "yaml", "bash", "batch", "markup", "json", "powershell"], "plugins": [], "css": false } diff --git a/src/components/CodeBox/index.tsx b/src/components/CodeBox/index.tsx index c07563b8d3..cf4a6f05e2 100644 --- a/src/components/CodeBox/index.tsx +++ b/src/components/CodeBox/index.tsx @@ -16,6 +16,7 @@ interface Props { const replaceLabelLanguages = (language: string) => language .replace(/powershell/i, 'pwsh') + .replace(/dockerfile/i, 'docker') .toUpperCase(); diff --git a/src/components/CodeBox/light.module.scss b/src/components/CodeBox/light.module.scss index bbaebccdb3..8096b24caa 100644 --- a/src/components/CodeBox/light.module.scss +++ b/src/components/CodeBox/light.module.scss @@ -7,11 +7,11 @@ &.prolog, &.doctype, &.cdata { - color: slategray; + color: slategray; } &.namespace { - opacity: 0.7; + opacity: 0.7; } &.property, @@ -21,7 +21,7 @@ &.constant, &.symbol, &.deleted { - color: #905; + color: #905; } &.selector, @@ -29,49 +29,49 @@ &.char, &.builtin, &.inserted { - color: #690; + color: #690; } &.entity, &.url { - background: hsla(0deg, 0%, 100%, 50%); - color: #9a6e3a; + background: hsla(0deg, 0%, 100%, 50%); + color: #9a6e3a; } &.atrule, &.attr-value, &.keyword { - color: #07a; + color: #07a; } &.function, &.class-name { - color: #dd4a68; + color: #dd4a68; } &.regex, &.important, &.variable { - color: #e90; + color: #e90; } &.important, &.bold { - font-weight: var(--font-weight-vold); + font-weight: var(--font-weight-vold); } &.italic { - font-style: italic; + font-style: italic; } &.entity { - cursor: help; + cursor: help; } &.punctuation, &.operator, &.string { - background-color: var(--black2); + background-color: var(--black2); } } }