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
Hi @hanford thanks for your work on this library. I was testing it out and I think I came across a bug. Not 100% sure what's going on but I think with the recursion the concatenated output string is hitting the default switch case and callling escapeHtml(children) 2 more times than needed.
When calling serialize({"children":[{"type":"p","children":[{"text":"& , \" < >"}]}]})...
Expected output: '& " < >'
Actual output: '&amp;amp; , &amp;quot; &amp;lt; &amp;gt;'
The text was updated successfully, but these errors were encountered:
I'm not convinced this should be calling escaping html at all because it's supposed to be serializing ast to markdown, not html. Shouldn't it instead leave < > and & alone, and turn ' and " into ' and " instead?
Hi @hanford thanks for your work on this library. I was testing it out and I think I came across a bug. Not 100% sure what's going on but I think with the recursion the concatenated output string is hitting the default switch case and callling
escapeHtml(children)
2 more times than needed.When calling
serialize({"children":[{"type":"p","children":[{"text":"& , \" < >"}]}]})
...Expected output:
'& " < >'
Actual output:
'&amp;amp; , &amp;quot; &amp;lt; &amp;gt;'
The text was updated successfully, but these errors were encountered: