-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Closed
Description
#4201 brought to my attention that we're using client-side rendering via the showdown JS library to render an app's README.md file in show case mode.
shiny/srcts/extras/shiny-showcase.ts
Lines 280 to 294 in f55c26a
| function renderMarkdown() { | |
| const mdContent = document.getElementById("showcase-markdown-content"); | |
| if (mdContent !== null) { | |
| // IE8 puts the content of <script> tags into innerHTML but | |
| // not innerText | |
| const content = mdContent.innerText || mdContent.innerHTML; | |
| const showdownConverter = (window as any).Showdown | |
| .converter as showdown.ConverterStatic; | |
| document.getElementById("readme-md").innerHTML = | |
| new showdownConverter().makeHtml(content); | |
| } | |
| } |
We now have a strong dependency on commonmark and can handle this rendering server-side, avoiding the additional JavaScript dependency.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels