Skip to content

Commit

Permalink
fix(CodeBlock): Support diff highlighting
Browse files Browse the repository at this point in the history
  • Loading branch information
72636c committed Oct 17, 2023
1 parent 4734f19 commit a95b9af
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
3 changes: 3 additions & 0 deletions src/private/Prism.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,16 @@ import { Prism } from 'prism-react-renderer';
// @ts-ignore
import csharpLang from 'refractor/lang/csharp';
// @ts-ignore
import diffLang from 'refractor/lang/diff';
// @ts-ignore
import httpLang from 'refractor/lang/http';
// @ts-ignore
import jsonLang from 'refractor/lang/json';
// @ts-ignore
import splunkSplLang from 'refractor/lang/splunk-spl';

csharpLang(Prism);
diffLang(Prism);
httpLang(Prism);
splunkSplLang(Prism);
jsonLang(Prism);
Expand Down
9 changes: 8 additions & 1 deletion src/storybook/markdown/code.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ JSON:
GraphQL:

```graphql
query($id: String!) {
query ($id: String!) {
candidate(id: $id) {
id {
value
Expand Down Expand Up @@ -245,3 +245,10 @@ Width and height:
- ```go
fmt.Println("this line is loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong")
```

---

```diff
- removed
+ added
```

0 comments on commit a95b9af

Please sign in to comment.