diff options
author | sudan <sudan@douban.com> | 2016-01-25 15:44:17 +0800 |
---|---|---|
committer | sudan <sudan@douban.com> | 2016-01-25 15:44:17 +0800 |
commit | 0d89e0fce14edee3a3fa7571b5e7792e2bdb2197 (patch) | |
tree | dabedaed6fb92d67220efd33ad8b3585d72e8c32 /templates/show_paste.html | |
parent | style (diff) | |
download | stackbin-0d89e0fce14edee3a3fa7571b5e7792e2bdb2197.tar.gz stackbin-0d89e0fce14edee3a3fa7571b5e7792e2bdb2197.tar.bz2 stackbin-0d89e0fce14edee3a3fa7571b5e7792e2bdb2197.zip |
code highlight
Diffstat (limited to 'templates/show_paste.html')
-rw-r--r-- | templates/show_paste.html | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/templates/show_paste.html b/templates/show_paste.html index 1c42e99..89ad18e 100644 --- a/templates/show_paste.html +++ b/templates/show_paste.html @@ -29,4 +29,13 @@ {% endif %} </dl> <div class=code><pre>{{ paste.code }}</pre></div> + <link rel="stylesheet" href="//cdn.jsdelivr.net/highlight.js/9.1.0/styles/default.min.css"> + <script src="//cdn.jsdelivr.net/highlight.js/9.1.0/highlight.min.js"></script> + <script> + $(document).ready(function() { + $('pre').each(function(i, block) { + hljs.highlightBlock(block); + }); + }); + </script> {% endblock %} |