You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I may also be using this wrong so please set me straight.
I get HTML content from an editor.
The user may have entered content that looks like markdown but entering markdown was not their intent.
When I do the following:
var converter = new ReverseMarkdown.Converter(); string html = html_string_from_editor; string result = converter.Convert(html);
During my testing I note that much of the content that looks like markdown is correctly escaped but not all is escaped.
It is a 50/50 split from my testing.
I note that Italics and bold are nicely escaped
entered into editor as *Italic Text* will come out of the Convert as \*Italic Text\* .
I note some of the formats completely ignored are
Headings such as # Heading 1
Points such as - Point 1.
Am I using this wrong?
Is there a config setting?
Or simply escaping a heading is not supported?
Quite a show stopper for me as I am using Xamarin Forms and the only editor I can use wants and produces HTML and my choice is to store the text as Markdown hence the conversion. My user base has a lot of text content that is certainly valid Markdown but the user is not aware of that and certainly does not expect the change in formatting.
'Why is my text bold and larger and where did the # go?' are just some of the questions I am getting.
Thanks in advance.
Chris ...
The text was updated successfully, but these errors were encountered:
As I have a wander through the source I can see within the Converters/Text.cs that within the ctor there is the code added to the _escapedKeyChars collection .... that escapes just bold and italics.
Is this the right spot?
Why only bold and italics escaped?
Assumption is we simply? add some more logic here to escape the other md formats?
@Chris-Marassovich Appreciate if you could share few examples with source html and the converted markdown text so that I get a better picture of what you are facing as an issue.
Hello and thanks for a great library.
I may also be using this wrong so please set me straight.
I get HTML content from an editor.
The user may have entered content that looks like markdown but entering markdown was not their intent.
When I do the following:
var converter = new ReverseMarkdown.Converter();
string html = html_string_from_editor;
string result = converter.Convert(html);
During my testing I note that much of the content that looks like markdown is correctly escaped but not all is escaped.
It is a 50/50 split from my testing.
I note that Italics and bold are nicely escaped
entered into editor as
*Italic Text*
will come out of the Convert as\*Italic Text\*
.I note some of the formats completely ignored are
Headings such as
# Heading 1
Points such as
- Point 1
.Am I using this wrong?
Is there a config setting?
Or simply escaping a heading is not supported?
Quite a show stopper for me as I am using Xamarin Forms and the only editor I can use wants and produces HTML and my choice is to store the text as Markdown hence the conversion. My user base has a lot of text content that is certainly valid Markdown but the user is not aware of that and certainly does not expect the change in formatting.
'Why is my text bold and larger and where did the # go?' are just some of the questions I am getting.
Thanks in advance.
Chris ...
The text was updated successfully, but these errors were encountered: