I'd like to convert markdown files to htmls (currently I am using marked.js but open to any similar tools). My markdown files have web components but the parser does not replace web components tags (like <web-table>
) and converts <
to <
.
I know one way is to just replace those changes:
html.replaceAll("<", "<").replaceAll(""", '"')
Is there a better way? How can I extend the markdown parser tags recognition to include custom tags like <web-components>
?
I am using marked.js but open to other similar markdown to html parsers as long as they provide an option to preserve web-components (custom tags).
Both pandoc and markdown-it parse HTMl tags with dashes (common in web components) correctly.