comparison app/assets/javascripts/init.tabs.js @ 128:7efe5e87658e

Separated marked configuration.
author Edho Arief <edho@myconan.net>
date Mon, 12 Nov 2012 17:23:35 +0700
parents 426fb7bb44bb
children 0785824a20b9
comparison
equal deleted inserted replaced
127:426fb7bb44bb 128:7efe5e87658e
1 $(document).ready(function() { 1 $(document).ready(function() {
2 if ($('#paste-show').length == 1) { 2 if ($('#paste-show').length == 1) {
3 raw = $('#plain pre').text(); 3 raw = $('#plain pre').text();
4 4
5 marked.setOptions({
6 gfm: true,
7 pedantic: false,
8 sanitize: true
9 });
10 $('#markdown div').html(marked(raw)); 5 $('#markdown div').html(marked(raw));
11 $('#markdown div pre').addClass('prettyprint'); 6 $('#markdown div pre').addClass('prettyprint');
12 $('#markdown div a').prop('rel', 'nofollow'); 7 $('#markdown div a').prop('rel', 'nofollow');
13 8
14 $('#highlight pre').text(raw); 9 $('#highlight pre').text(raw);