Skip to content
Closed
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
8 changes: 6 additions & 2 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,14 @@ import Markdown from 'remarkable';
class Remarkable extends React.Component {

render() {
var Container = this.props.container;
var { container: Container, ...props } = this.props;

['children', 'options', 'source'].forEach(prop => {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should container be added here as well?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No need, it's not part of props due to the destructuring above.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oops, I'm blind. Carry on 👍
Would love to see this merged soon - was just about to make a PR as well until I saw yours :)

delete props[prop];
});

return (
<Container>
<Container {...props}>
{this.content()}
</Container>
);
Expand Down