Skip to content
This repository has been archived by the owner on Jul 3, 2024. It is now read-only.

Commit

Permalink
Change markdown library
Browse files Browse the repository at this point in the history
  • Loading branch information
SomeBottle authored Nov 7, 2021
1 parent ff880fc commit e98617d
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions template.html
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,14 @@
</div>
</body>
<script src="https://cdn.jsdelivr.net/npm/prismjs/prism.min.js"></script>
<script src='https://cdn.jsdelivr.net/npm/marked/marked.min.js'></script>
<script src='https://cdn.jsdelivr.net/npm/markdown-it@latest/dist/markdown-it.min.js'></script>
<script src="https://cdn.jsdelivr.net/gh/SomeBottle/[email protected]/othumb.m.js"></script>
<script>
var readmefile = "{[ReadmeFile]}";
async function renderReadme() {
const resp = await fetch(readmefile)
if (!resp.ok) return
document.querySelector("#readme").innerHTML = window.marked(await resp.text());
document.querySelector("#readme").innerHTML = window.markdownit().render(await resp.text());
Prism.highlightAll()
}

Expand Down Expand Up @@ -159,9 +159,9 @@
<div class='previewtext markdown-body' id='md'>{[FileContent]}</div>
</div>
</div>
<script src='https://cdn.jsdelivr.net/npm/marked/marked.min.js'></script>
<script src='https://cdn.jsdelivr.net/npm/markdown-it@latest/dist/markdown-it.min.js'></script>
<script>
document.getElementById('md').innerHTML=marked(document.getElementById('md').innerHTML);
document.getElementById('md').innerHTML=window.markdownit().render(document.getElementById('md').innerHTML);
</script>
{{MDPreviewEnd}}
{{CodePreview}}
Expand Down

0 comments on commit e98617d

Please sign in to comment.