Skip to content

Commit

Permalink
Enable java syntax highlighting (#669)
Browse files Browse the repository at this point in the history
  • Loading branch information
72636c authored Oct 9, 2024
1 parent c21aa05 commit a6fbb60
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
5 changes: 5 additions & 0 deletions .changeset/funny-ears-protect.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'scoobie': patch
---

CodeBlock: Enable `java` syntax highlighting
7 changes: 5 additions & 2 deletions src/private/Prism.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ import diffLang from 'refractor/lang/diff';
// @ts-expect-error
import httpLang from 'refractor/lang/http';
// @ts-expect-error
import javaLang from 'refractor/lang/java';
// @ts-expect-error
import jsonLang from 'refractor/lang/json';
// @ts-expect-error
import splunkSplLang from 'refractor/lang/splunk-spl';
Expand All @@ -16,8 +18,9 @@ bashLang(Prism);
csharpLang(Prism);
diffLang(Prism);
httpLang(Prism);
splunkSplLang(Prism);
javaLang(Prism);
jsonLang(Prism);
splunkSplLang(Prism);

export { Prism } from 'prism-react-renderer';
export { themes } from 'prism-react-renderer';
Expand All @@ -27,7 +30,7 @@ const DEFAULT_LANGUAGE = 'text';
const DISPLAY_LANGUAGE_REPLACEMENTS: Record<string, string> = {
'splunk-spl': 'Splunk SPL',
csharp: 'C#',
fsharp: 'C#',
fsharp: 'F#',
graphql: 'GraphQL',
html: 'HTML',
http: 'HTTP',
Expand Down
1 change: 0 additions & 1 deletion yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3497,7 +3497,6 @@

"@zendesk/babel-plugin-react-displayname@https://codeload.github.com/zendesk/babel-plugin-react-displayname/tar.gz/7a837f2":
version "1.0.0"
uid "8cdd54fa1526715c5fc1abdbc2811deac6485f3c"
resolved "https://codeload.github.com/zendesk/babel-plugin-react-displayname/tar.gz/7a837f2#8cdd54fa1526715c5fc1abdbc2811deac6485f3c"
dependencies:
"@babel/helper-plugin-utils" "^7.0.0"
Expand Down

0 comments on commit a6fbb60

Please sign in to comment.