Skip to content
Browse files

added coderay example

  • Loading branch information...
1 parent b52365e commit a5d61c435517a56c36ac606e7bbd9bcedc46cf32 @wbzyl wbzyl committed
Showing with 15 additions and 2 deletions.
  1. +13 −0 examples/app-coderay.rb
  2. +2 −2 examples/coderay.ru
View
13 examples/app-coderay.rb
@@ -0,0 +1,13 @@
+path = File.expand_path("../lib")
+$:.unshift(path) unless $:.include?(path)
+
+require 'rubygems'
+require 'sinatra'
+
+require 'rack/codehighlighter'
+
+require 'coderay' # Coderay
+
+get "/" do
+ erb :index
+end
View
4 examples/coderay.ru
@@ -1,8 +1,8 @@
-require 'app'
+require './app-coderay'
use Rack::ShowExceptions
use Rack::Lint
-use Rack::Codehighlighter, :prettify, :element => "pre", :pattern => /\A:::(\w+)\s*\n/, :logging => true
+use Rack::Codehighlighter, :coderay, :element => "pre", :pattern => /\A:::(\w+)\s*\n/, :logging => true
run Sinatra::Application

0 comments on commit a5d61c4

Please sign in to comment.
Something went wrong with that request. Please try again.