Mercurial > zeropaste
diff app/assets/javascripts/init.tabs.js @ 120:309238f5b7b1
Prettyprint in markdown.
author | Edho Arief <edho@myconan.net> |
---|---|
date | Mon, 12 Nov 2012 14:35:19 +0700 |
parents | e3f3402da5a1 |
children | dd7181c021de |
line wrap: on
line diff
--- a/app/assets/javascripts/init.tabs.js Mon Nov 12 14:19:21 2012 +0700 +++ b/app/assets/javascripts/init.tabs.js Mon Nov 12 14:35:19 2012 +0700 @@ -2,11 +2,13 @@ if ($('#paste-tabs').length == 1) { raw = $('#plain pre').text(); + $('#markdown div').html(marked(raw)); + $('#markdown div pre').addClass('prettyprint'); + $('#highlight pre').text(raw); + window.prettyPrint && prettyPrint(); - $('#markdown div').html(marked(raw)); - update_state = function() { var paste = $('#paste'), mode = paste.data('mode'),