I've downloaded a Markdown JS library but I don't know if it supports syntax highlighting, or any of his two supported dialects (gruber/maruku), because its the first time I try to add markdown support to my webpages. So, I would like to know how to integrate a syntax highlighter (like Alex Gorbatchev's JS library) to markdown.
Any other libraries are welcome. Basically, my Markdown snippets are in .md files loaded that way:
<div class="markdown-f">
<?= file_get_contents("file.md"); ?>
</div>
and it contains code snippets together with common Markdown text. I need a JS library to be able of doing something like:
<script>
$('.markdown-f').each(function() {
var contents = $(this).text();
$(this).empty();
contents = markdown.toHTML(contents);
$(this).text(contents);
});
</script>
with a dialect or any other hacktrick supporting syntax highlighting (specifying manually the target language for example).