Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@
export {
MarkdownAsync,
MarkdownHooks,
Markdown as default,
Markdown,
defaultUrlTransform
} from './lib/index.js'
20 changes: 10 additions & 10 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -101,14 +101,14 @@ npm install react-markdown
In Deno with [`esm.sh`][esmsh]:

```js
import Markdown from 'https://esm.sh/react-markdown@10'
import { Markdown } from 'https://esm.sh/react-markdown@10'
```

In browsers with [`esm.sh`][esmsh]:

```html
<script type="module">
import Markdown from 'https://esm.sh/react-markdown@10?bundle'
import { Markdown } from 'https://esm.sh/react-markdown@10?bundle'
</script>
```

Expand All @@ -119,7 +119,7 @@ A basic hello world:
```js
import React from 'react'
import {createRoot} from 'react-dom/client'
import Markdown from 'react-markdown'
import { Markdown } from 'react-markdown'

const markdown = '# Hi, *Pluto*!'

Expand All @@ -145,7 +145,7 @@ URLs directly):
```js
import React from 'react'
import {createRoot} from 'react-dom/client'
import Markdown from 'react-markdown'
import { Markdown } from 'react-markdown'
import remarkGfm from 'remark-gfm'

const markdown = `Just a link: www.nasa.gov.`
Expand All @@ -169,11 +169,11 @@ createRoot(document.body).render(
## API

This package exports the identifiers
[`Markdown`][api-markdown],
[`MarkdownAsync`][api-markdown-async],
[`MarkdownHooks`][api-markdown-hooks],
and
[`defaultUrlTransform`][api-default-url-transform].
The default export is [`Markdown`][api-markdown].

It also exports the additional [TypeScript][] types
[`AllowElement`][api-allow-element],
Expand Down Expand Up @@ -375,7 +375,7 @@ which adds support for strikethrough, tables, tasklists and URLs directly:
```js
import React from 'react'
import {createRoot} from 'react-dom/client'
import Markdown from 'react-markdown'
import { Markdown } from 'react-markdown'
import remarkGfm from 'remark-gfm'

const markdown = `A paragraph with *emphasis* and **strong importance**.
Expand Down Expand Up @@ -445,7 +445,7 @@ strikethrough:
```js
import React from 'react'
import {createRoot} from 'react-dom/client'
import Markdown from 'react-markdown'
import { Markdown } from 'react-markdown'
import remarkGfm from 'remark-gfm'

const markdown = 'This ~is not~ strikethrough, but ~~this is~~!'
Expand Down Expand Up @@ -481,7 +481,7 @@ In this case, we apply syntax highlighting with the seriously super amazing
```js
import React from 'react'
import {createRoot} from 'react-dom/client'
import Markdown from 'react-markdown'
import { Markdown } from 'react-markdown'
import {Prism as SyntaxHighlighter} from 'react-syntax-highlighter'
import {dark} from 'react-syntax-highlighter/dist/esm/styles/prism'

Expand Down Expand Up @@ -543,7 +543,7 @@ is used to support math in markdown, and a transform plugin
```js
import React from 'react'
import {createRoot} from 'react-dom/client'
import Markdown from 'react-markdown'
import { Markdown } from 'react-markdown'
import rehypeKatex from 'rehype-katex'
import remarkMath from 'remark-math'
import 'katex/dist/katex.min.css' // `rehype-katex` does not import the CSS for you
Expand Down Expand Up @@ -661,7 +661,7 @@ can spare the bundle size (±60kb minzipped), then you can use
```js
import React from 'react'
import {createRoot} from 'react-dom/client'
import Markdown from 'react-markdown'
import { Markdown } from 'react-markdown'
import rehypeRaw from 'rehype-raw'

const markdown = `<div class="note">
Expand Down
2 changes: 1 addition & 1 deletion test.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import {render, waitFor} from '@testing-library/react'
import concatStream from 'concat-stream'
import {Component} from 'react'
import {renderToPipeableStream, renderToStaticMarkup} from 'react-dom/server'
import Markdown, {MarkdownAsync, MarkdownHooks} from 'react-markdown'
import {Markdown, MarkdownAsync, MarkdownHooks} from 'react-markdown'
import rehypeRaw from 'rehype-raw'
import rehypeStarryNight from 'rehype-starry-night'
import remarkGfm from 'remark-gfm'
Expand Down
Loading