remarkable icon indicating copy to clipboard operation
remarkable copied to clipboard

Use case for not wrapping output with <p>..</p> tags

Open EdmundsEcho opened this issue 8 years ago • 1 comments

This is a robust parser that I greatly appreciate being able to use in my work. Thank you! While using the code I came across the following idea for a feature.

Use case

Using the markdown parser within a table.

Feature request

Include an option to suppress the <p> tag wrapper.

Input

<Markdown container='span'>Markdown **important** that gets rendered<Markdown />

Current output

<span key=".0" dangerouslySetInnerHTML: {__html: "<p>Markdown <strong>important</strong> that gets rendered.</p>\n"></span>

The extra <p> tag creates extra, unwanted spacing in the table cell.

Desired output

<span key=".0" dangerouslySetInnerHTML: {__html: "Markdown <strong>important</strong> that gets rendered.\n"></span>

This control feature would enable use of the parser in more places within my apps.

- E

EdmundsEcho avatar Nov 04 '17 15:11 EdmundsEcho

I would like this feature, too--this makes it harder to render inline markdown-styled content (I could override styles, but that's less optimal).

turnerhayes avatar Dec 16 '19 01:12 turnerhayes