Skip to content

Commit e459559

Browse files
authored
Update README.md (#53)
1 parent e832c15 commit e459559

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

package/README.md

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,10 @@ A performant client-side syntax highlighting component and hook for React, built
3131
## Features
3232

3333
- 🖼️ Provides both a `ShikiHighlighter` component and a `useShikiHighlighter` hook for more flexibility
34-
- 🔐 No `dangerouslySetInnerHTML` - output from Shiki is parsed using `html-react-parser`
34+
- 🔐 Shiki output is processed from HAST directly into React elements, no `dangerouslySetInnerHTML` required
3535
- 📦 Supports all built-in Shiki languages and themes
3636
- 🖌️ Full support for custom TextMate themes and languages
37-
- 🔧 Supports passing custom Shiki transformers to the highlighter
37+
- 🔧 Supports passing custom Shiki transformers to the highlighter, in addition to all other options supported by `codeToHast`
3838
- 🚰 Performant highlighting of streamed code, with optional throttling
3939
- 📚 Includes minimal default styles for code blocks
4040
- 🚀 Shiki dynamically imports only the languages and themes used on a page for optimal performance
@@ -80,6 +80,9 @@ function CodeBlock({ code, language }) {
8080

8181
### Common Configuration Options
8282

83+
> [!IMPORTANT]
84+
> `react-shiki` now supports all options that [`codeToHast`](https://github.com/shikijs/shiki/blob/main/packages/types/src/options.ts#L121) supports, this table has not yet been updated to reflect this.
85+
8386
| Option | Type | Default | Description |
8487
| ------------------- | ------------------ | --------------- | ------------------------------------------------------------------------- |
8588
| `code` | `string` | - | Code to highlight |
@@ -447,7 +450,7 @@ export const CodeHighlight = ({
447450
};
448451
```
449452

450-
Passed to `react-markdown` as a `code` component in memo-ized chat messages:
453+
Passed to `react-markdown` as a `code` component in memoized chat messages:
451454

452455
```tsx
453456
const RenderedMessage = React.memo(({ message }: { message: Message }) => (

0 commit comments

Comments
 (0)