diff app/assets/javascripts/init.tabs.js @ 132:e05e47f7d224

Add raw texts first before doing anything with them.
author Edho Arief <edho@myconan.net>
date Mon, 12 Nov 2012 17:27:53 +0700
parents 7c7601575358
children 342373709d16
line wrap: on
line diff
--- a/app/assets/javascripts/init.tabs.js	Mon Nov 12 17:27:14 2012 +0700
+++ b/app/assets/javascripts/init.tabs.js	Mon Nov 12 17:27:53 2012 +0700
@@ -6,11 +6,10 @@
     markdown = $('#markdown div');
 
   markdown.html(marked(raw));
+  $('#highlight pre').text(raw);
+
   markdown.find('pre').addClass('prettyprint');
   markdown.find('a').prop('rel', 'nofollow');
-
-  $('#highlight pre').text(raw);
-
   window.prettyPrint && prettyPrint();
 
   update_state = function() {