spicyj/marked-react — pull request #2 by rcs (2014-03-10 19:15:32+00:00)
Title: add paragraphFn option to control the type of React.DOM component output

Love the work you've done here, but I'd like to get paragraph tags out of marked-react for paragraph blocks.

This adds an option to preserve the existing behavior:

```js
marked.setOptions({
paragraphFn: function(text) {
return React.DOM.div({className: 'paragraph'}, text);
}
});
```

Example use:
```
rcs at Boreas in ~/Devel/marked-react on master
❯ node
> global.React = require('react');1;
1
> marked = require('.');1;
1
> React.renderComponentToString(marked('__example text__')[0])
'

example text

'
> marked.setOptions({paragraphFn: function(text) { return React.DOM.div({className: 'paragraph'}, text); }});1;
1
> React.renderComponentToString(marked('__example text__')[0])
'

example text

'
>
```