From 1b6391c94356c95755a6cc64cd526511b8edb69f Mon Sep 17 00:00:00 2001 From: Filip Seman Date: Thu, 17 Aug 2023 11:46:07 +0200 Subject: [PATCH] feat(syntax-highlighter): add light variant called "idea" (#8938) --- docs/usage/configuration.md | 4 ++-- src/core/syntax-highlighting.js | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/docs/usage/configuration.md b/docs/usage/configuration.md index f6556f447f7..d3dbe2dfdbc 100644 --- a/docs/usage/configuration.md +++ b/docs/usage/configuration.md @@ -229,9 +229,9 @@ Parameter name | Docker variable | Description Unavailable String=["agate"*, "arta", "monokai", "nord", "obsidian", - "tomorrow-night"]. . Highlight.js - syntax coloring theme to use. (Only these 6 styles are available.) + syntax coloring theme to use. (Only these 7 styles are available.) diff --git a/src/core/syntax-highlighting.js b/src/core/syntax-highlighting.js index 86f79bd0ff1..fcca99b18fe 100644 --- a/src/core/syntax-highlighting.js +++ b/src/core/syntax-highlighting.js @@ -14,6 +14,7 @@ import monokai from "react-syntax-highlighter/dist/esm/styles/hljs/monokai" import nord from "react-syntax-highlighter/dist/esm/styles/hljs/nord" import obsidian from "react-syntax-highlighter/dist/esm/styles/hljs/obsidian" import tomorrowNight from "react-syntax-highlighter/dist/esm/styles/hljs/tomorrow-night" +import idea from "react-syntax-highlighter/dist/esm/styles/hljs/idea" SyntaxHighlighter.registerLanguage("json", json) SyntaxHighlighter.registerLanguage("js", js) @@ -24,7 +25,7 @@ SyntaxHighlighter.registerLanguage("bash", bash) SyntaxHighlighter.registerLanguage("powershell", powershell) SyntaxHighlighter.registerLanguage("javascript", javascript) -const styles = {agate, arta, monokai, nord, obsidian, "tomorrow-night": tomorrowNight} +const styles = {agate, arta, monokai, nord, obsidian, "tomorrow-night": tomorrowNight, idea} export const availableStyles = Object.keys(styles) export const getStyle = name => {