changeset 120:309238f5b7b1

Prettyprint in markdown.
author Edho Arief <edho@myconan.net>
date Mon, 12 Nov 2012 14:35:19 +0700
parents 52fa2536a102
children dd7181c021de
files app/assets/javascripts/init.tabs.js
diffstat 1 files changed, 4 insertions(+), 2 deletions(-) [+]
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'),