-
Notifications
You must be signed in to change notification settings - Fork 116
Expand file tree
/
Copy pathmarkdown.js
More file actions
27 lines (25 loc) Β· 732 Bytes
/
markdown.js
File metadata and controls
27 lines (25 loc) Β· 732 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
import React from 'react'
import rehypeReact from 'rehype-react'
import Exercise from './components/exercise'
import CodeBlock from './components/code'
import { Link } from './components/link'
import Slides from './components/slides'
import Choice, { Option } from './components/choice'
import { H3, Hr, Ol, Ul, Li, InlineCode } from './components/typography'
export const renderAst = new rehypeReact({
createElement: React.createElement,
components: {
exercise: Exercise,
slides: Slides,
codeblock: CodeBlock,
choice: Choice,
opt: Option,
a: Link,
hr: Hr,
h3: H3,
ol: Ol,
ul: Ul,
li: Li,
code: InlineCode,
},
}).Compiler