forked from remarkjs/react-markdown
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathwith-html.js
More file actions
20 lines (15 loc) Β· 676 Bytes
/
with-html.js
File metadata and controls
20 lines (15 loc) Β· 676 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
'use strict'
const xtend = require('xtend')
const ReactMarkdown = require('./react-markdown')
const htmlParser = require('./plugins/html-parser')
const parseHtml = htmlParser()
function ReactMarkdownWithHtml(props) {
const astPlugins = [parseHtml].concat(props.astPlugins || [])
return ReactMarkdown(xtend(props, {astPlugins}))
}
ReactMarkdownWithHtml.defaultProps = ReactMarkdown.defaultProps
ReactMarkdownWithHtml.propTypes = ReactMarkdown.propTypes
ReactMarkdownWithHtml.types = ReactMarkdown.types
ReactMarkdownWithHtml.renderers = ReactMarkdown.renderers
ReactMarkdownWithHtml.uriTransformer = ReactMarkdown.uriTransformer
module.exports = ReactMarkdownWithHtml