# HG changeset patch # User Edho Arief # Date 1349301022 -25200 # Node ID f957ce997ff049d45ca5f515c99dd06889a30b29 # Parent e8920b00035c92143ce14f4adce2898351c4b2a2 Added basic syntax highlighter. diff -r e8920b00035c -r f957ce997ff0 app/assets/javascripts/application.js --- a/app/assets/javascripts/application.js Thu Oct 04 04:37:41 2012 +0700 +++ b/app/assets/javascripts/application.js Thu Oct 04 04:50:22 2012 +0700 @@ -12,4 +12,5 @@ // //= require jquery //= require jquery_ujs +//= require bootstrap-prettify //= require_tree . diff -r e8920b00035c -r f957ce997ff0 app/assets/javascripts/init.prettify.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/app/assets/javascripts/init.prettify.js Thu Oct 04 04:50:22 2012 +0700 @@ -0,0 +1,3 @@ +$(document).ready(function() { + window.prettyPrint && prettyPrint() +}); diff -r e8920b00035c -r f957ce997ff0 app/assets/stylesheets/application.css --- a/app/assets/stylesheets/application.css Thu Oct 04 04:37:41 2012 +0700 +++ b/app/assets/stylesheets/application.css Thu Oct 04 04:50:22 2012 +0700 @@ -9,5 +9,6 @@ * compiled file, but it's generally better to create a new file per style scope. * *= require_self + *= require bootstrap-prettify *= require_tree . */ diff -r e8920b00035c -r f957ce997ff0 app/views/pastes/show.html.erb --- a/app/views/pastes/show.html.erb Thu Oct 04 04:37:41 2012 +0700 +++ b/app/views/pastes/show.html.erb Thu Oct 04 04:50:22 2012 +0700 @@ -2,7 +2,7 @@ -
<%= @paste.paste %>
+
<%= @paste.paste %>