changeset 128:7efe5e87658e

Separated marked configuration.
author Edho Arief <edho@myconan.net>
date Mon, 12 Nov 2012 17:23:35 +0700
parents 426fb7bb44bb
children 0785824a20b9
files app/assets/javascripts/application.js app/assets/javascripts/init.marked.js app/assets/javascripts/init.tabs.js
diffstat 3 files changed, 6 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/app/assets/javascripts/application.js	Mon Nov 12 16:45:19 2012 +0700
+++ b/app/assets/javascripts/application.js	Mon Nov 12 17:23:35 2012 +0700
@@ -17,5 +17,6 @@
 //= require twitter/bootstrap/dropdown
 //= require prettify
 //= require marked
+//= require init.marked
 //= require jquery.autosize
 //= require_tree .
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/app/assets/javascripts/init.marked.js	Mon Nov 12 17:23:35 2012 +0700
@@ -0,0 +1,5 @@
+marked.setOptions({
+  gfm: true,
+  pedantic: true,
+  sanitize: true
+});
--- a/app/assets/javascripts/init.tabs.js	Mon Nov 12 16:45:19 2012 +0700
+++ b/app/assets/javascripts/init.tabs.js	Mon Nov 12 17:23:35 2012 +0700
@@ -2,11 +2,6 @@
   if ($('#paste-show').length == 1) {
     raw = $('#plain pre').text();
 
-    marked.setOptions({
-      gfm: true,
-      pedantic: false,
-      sanitize: true
-    });
     $('#markdown div').html(marked(raw));
     $('#markdown div pre').addClass('prettyprint');
     $('#markdown div a').prop('rel', 'nofollow');