It is sometimes useful to convert markdowns into plain text (for example, for sending by email).
Does any of these libraries support this functionality? (I'm actually more interested in MarkdownSharp)
EDIT
Reply to Jorn's comment. I will clarify what I expect from such a conversion:
Markdown has special characters that, depending on the context, have only a formatting value. For example, the characters **, =, -. It would be nice if I could clear the text of the formatting characters.
Iβm not sure what the best approach would be and what characters should be removed, and I donβt know what to do with links, for example, but I think that someone could have done something in this sense earlier.
EDIT 2
Found a good example: Stackoverflow uses this type of markdown removal in the "Questions" list. I am sure that it clears the formatting of the mark before passing the summary of the question, otherwise it will contain line breaks, strengths, H1, etc.
EDIT 3
I agree with John. The best solution seems to be to convert from markdowns to HTML and then remove the resulting HTML code.
And this task seems to have already been solved: How can I remove HTML from text in .NET?
source share