Closed ckouder closed 1 year ago
markdown-it
seems good to me! I don't know any other use cases beyond these we've encountered.
This is the proof of concept for markdown-it: https://stackblitz.com/edit/nuxt-starter-eqm5kg?file=pages%2Findex.vue,nuxt.config.js,package.json. It solves the problems we encounter
I think the next step would be to make the needed changes in the code base in a branch for this, then when ready, we'll merge to development to get it in front of the other PI's
I merged #176, and tested that it works for this particular artifact -- so closing this issue.
The problem David J mentions that markdown tables do not render in HAI artifact is caused by a renderer failure on markdown tables inside html tags. Here is an image to the source code that causes the failure: And here is an image to the showdownJS official demo website to show the origin of the problem:
However, the markdown table does get rendered after html tags are removed. As shown in this picture:
ShowdownJS by default does not support markdown inside html tags unless the creator of markdown specifies a html attribute
markdown=1
inside a html tag e.g.<sometag markdown="1"></sometag>
. However, the solution is impossible in our use cases. We might need to look into other markdown renderers; even though that means redoing all XSS tests on another renderer.I've tested markdown-it and it works perfectly with markdown tables inside html tags (XSS tests not done yet).
However, I think a discussion might still be needed in case if there is some other edge cases that markdown-it might fail.... what do you think? @lauratinnel @dpemmerich @carboxylman