feat(syntax-highlighter): add light variant called "idea" (#8938)

This commit is contained in:
Filip Seman
2023-08-17 11:46:07 +02:00
committed by GitHub
parent c90ef50e73
commit 1b6391c943
2 changed files with 4 additions and 3 deletions

View File

@@ -229,9 +229,9 @@ Parameter name | Docker variable | Description
</td>
<td><em>Unavailable</em></td>
<td><code>String=["agate"*, "arta", "monokai", "nord", "obsidian",
"tomorrow-night"]</code>. <a
"tomorrow-night", "idea"]</code>. <a
href="https://highlightjs.org/static/demo/" rel="nofollow">Highlight.js</a>
syntax coloring theme to use. (Only these 6 styles are available.)
syntax coloring theme to use. (Only these 7 styles are available.)
</td>
</tr>
<tr>

View File

@@ -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 => {