mirror of
https://github.com/xoofx/markdig.git
synced 2026-02-10 05:49:27 +00:00
Setting for not wrapping the parsed HTML in <p> tags #65
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @hemantkd on GitHub (Nov 11, 2016).
Hi @xoofx ,
Is there a setting or option that I can use so that when I'm doing:
Markdown.ToHtml("This is a text with some *emphasis*"),I get the parsed output as
This is a text with some <em>emphasis</em>instead of
<p>This is a text with some <em>emphasis</em></p>?@xoofx commented on GitHub (Nov 11, 2016):
nothing like this. I guess you can remove manually the
<p>...</p>as a simple post process on the output string if you are sure that it doesn't contain anything more than a single paragraph@hemantkd commented on GitHub (Nov 11, 2016):
Thank you. Just wanted to confirm. Cheers!
@jjxtra commented on GitHub (Jan 10, 2023):
If you do this, don't use regex. You have to actually parse the html, make sure there is a global
...
and only remove in that case. For some text with newlines, you will get...
...
in which case you may want to leave it alone.@xoofx commented on GitHub (Jan 10, 2023):
Could you avoid commenting on 3 different issues the same problem? It's very annoying to receive 3 notifications for the same topics we already responded that are closed.