Skip to content

Instantly share code, notes, and snippets.

@bquistorff
Created August 25, 2014 17:13
Show Gist options
  • Save bquistorff/9763d693776500764f33 to your computer and use it in GitHub Desktop.
Save bquistorff/9763d693776500764f33 to your computer and use it in GitHub Desktop.
How to custom syntax highlight Stata gists
<!-- include in header -->
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<!-- These below should be integrated into highlight.js -->
<link rel="stylesheet" href="http://quistorff.com/stata/stata-default.css">
<script src="http://quistorff.com/stata/highlight.pack.js"></script>
<script>
$(document).ready(function() {
$('div.line').replaceWith(function() { return this.innerHTML.concat('\n'); });
$('pre').each(function(i, block) { hljs.highlightBlock(block); });
});
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment