<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.2.0/styles/default.min.css">
<script src="https://cdnjs.cloudflare.com/ajax/libs/showdown/1.9.1/showdown.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.2.0/highlight.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.6.0/jquery.min.js"></script>
<body>
<div id="markdown-content"></div>
<script>
window.onload = function() {
var markdownContent = document.getElementById('markdown-content');
var markdownConverter = new showdown.Converter();
var markdownText = '```javascript\nfunction add(x, y) {\n return x + y;\n}\n```';
var html = markdownConverter.makeHtml(markdownText);
markdownContent.innerHTML = html;
$('pre code').each(function(i, block) {
hljs.highlightBlock(block);
});
};
</script>
</body>