Skip to content

Commit

Permalink
Fix shiki import in example code
Browse files Browse the repository at this point in the history
  • Loading branch information
Trinovantes committed Aug 21, 2024
1 parent 0b90515 commit 0a6c566
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ By default, the HTML compiler will simply output plaintext inside `<pre>` tags.
If you wish to enable syntax highlighting, you will need to provide a `shiki` object in `RstGeneratorOptions`:

```ts
import { getHighlighter } from 'shiki'
import { createHighlighter } from 'shiki'
import { RstToHtmlCompiler, RstGeneratorOptions } from 'rst-compiler'

const generatorOptions: Partial<RstGeneratorOptions> = {
Expand Down
2 changes: 1 addition & 1 deletion demo/components/DefaultText.rst
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ However, this demo is configured to use :code:`shiki` for syntax highlighting:

.. code:: js
import { getHighlighter } from 'shiki'
import { createHighlighter } from 'shiki'
import { RstToHtmlCompiler, RstGeneratorOptions } from 'rst-compiler'
const generatorOptions: Partial<RstGeneratorOptions> = {
Expand Down

0 comments on commit 0a6c566

Please sign in to comment.