docusaurus/lib/core/MarkdownBlock.js

25 lines
516 B
JavaScript
Raw Normal View History

2017-07-07 13:28:29 -04:00
/**
* Copyright (c) 2017-present, Facebook, Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
2017-07-07 13:28:29 -04:00
*/
/**
* The MarkdownBlock component is used to parse markdown and render to HTML.
*/
2017-08-15 19:55:38 -04:00
const React = require('react');
const Remarkable = require('./Remarkable');
2017-07-07 13:28:29 -04:00
class MarkdownBlock extends React.Component {
2017-07-07 13:28:29 -04:00
render() {
2017-07-10 19:38:35 -04:00
return (
<Remarkable source={this.props.children} />
2017-07-10 19:38:35 -04:00
);
2017-07-07 13:28:29 -04:00
}
}
module.exports = MarkdownBlock;