Skip to content

Commit

Permalink
Update README.md (#534)
Browse files Browse the repository at this point in the history
move `Markdown` from named imports to default for renderRule example. Fixes issue where copy/pasting would cause error as `Markdown` is not a named export
  • Loading branch information
majman authored Jan 27, 2024
1 parent 5a4c470 commit 3e0815d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -409,7 +409,7 @@ Forces the compiler to have space between hash sign `#` and the header text whic
Supply your own rendering function that can selectively override how _rules_ are rendered (note, this is different than _`options.overrides`_ which operates at the HTML tag level and is more general). You can use this functionality to do pretty much anything with an established AST node; here's an example of selectively overriding the "codeBlock" rule to process LaTeX syntax using the `@matejmazur/react-katex` library:

````tsx
import { Markdown, RuleType } from 'markdown-to-jsx'
import Markdown, { RuleType } from 'markdown-to-jsx'
import TeX from '@matejmazur/react-katex'

const exampleContent =
Expand Down

0 comments on commit 3e0815d

Please sign in to comment.