Closed chifandeyu closed 2 years ago
Er, I think your example is not right. For example there are no h
s in the input text.
And just to make sure that I can tell what the output is which you do not like, can you show the raw HTML, rather than HTML which my browser is interpreting.
What output do you expect to see?
Er, I think your example is not right. For example there are no
h
s in the input text.And just to make sure that I can tell what the output is which you do not like, can you show the raw HTML, rather than HTML which my browser is interpreting.
What output do you expect to see?
Thank you for your reply. I want to convert like that format text:
Please show the HTML tags that you expect. If I had to guess at what you pasted, it looks like you want the em and strong tags to cross over each other, which is not allowed in HTML.
The Dart markdown package adheres to the CommonMark standard, which would output <p>a_bc<strong>d_e</strong></p>
. See https://babelmark.github.io/?text=a_bc**d_e**
Please show the HTML tags that you expect. If I had to guess at what you pasted, it looks like you want the em and strong tags to cross over each other, which is not allowed in HTML.
The Dart markdown package adheres to the CommonMark standard, which would output
<p>a_bc\<strong\>d_e\</strong\></p>
. See https://babelmark.github.io/?text=a_bc**d_e**
<html>
<body>
<div>a<i>bc</i><i><b>d</b></i><b>e</b></div>
</body>
</html>
For the above markdown, it is converted by delta. Is the format wrong?
OK cool, I see what you expect.
Yes the markdown package will not produce that output. I don't know if there is a way in pure markdown to get the output you desire, but you can use inline HTML tags perhaps: a<em>bc</em>**<em>d</em>e**
.
String markdown = 'a_bc**d_e**';
final html = markdownToHtml(markdown);
then html is 'ah_ehfa_uhdf
'