If this is the wrong place to file this problem/bug, I can move it to the appropriate place
Issue(s)
- When attempting to change a block of HTML into structured text that has a
<del>html tag, the resulting structured text has removed the<del> - See the same thing happen with
<sup>html tag
Oddly enough, If I were to pass in HTML with a <s> tag, the structured text has a "marks":["strikethrough"] in the appropriate place. If I take that structured text and pass it through the datocms-structured-text-to-html-string library, it will return HTML that has <del> tag instead of <s>. (Which seems legit to me).
Example code
import {parse} from 'parse5'
import {parse5ToStructuredText} from 'datocms-html-to-structured-text';
const html = "some block of html"
const dom = parse(html, {
sourceCodeLocationInfo: true,
});
result = await parse5ToStructuredText(dom);
Steps to repeat del issue
- Pass the following HTML to
parse5ToStructuredTextfunction:Hello world, this should be <del>striked</del>. - Function returns:
{"dast":{"schema":"dast","document":{"children":[{"type":"paragraph","children":[{"value":"Hello world, this should be ","type":"span"},{"value":"striked","type":"span"},{"value":".","type":"span"}]}],"type":"root"}}}
Steps to repeat sup issue
- Pass the following HTML to
parse5ToStructuredTextfunction:Hello world, this should be <sup>sup</sup>. - Functions returns:
{"dast":{"schema":"dast","document":{"children":[{"type":"paragraph","children":[{"value":"Hello world, this should be ","type":"span"},{"value":"sup","type":"span"},{"value":".","type":"span"}]}],"type":"root"}}}
Versions
"datocms-html-to-structured-text": "^3.0.0",
"datocms-structured-text-to-html-string": "^3.0.0",