moved from albino -> pygments.rb

This commit is contained in:
gitlabhq 2011-10-21 15:35:42 +03:00
parent f280819189
commit 1477a6c8aa
7 changed files with 21 additions and 17 deletions

View file

@ -32,8 +32,7 @@ class Snippet < ActiveRecord::Base
end
def colorize
ft = handle_file_type(file_name)
Albino.colorize(content, ft, :html, 'utf-8', "linenos=True")
system_colorize(content, file_name)
end
end
# == Schema Information

View file

@ -1,3 +1,4 @@
:css
.view_file
.view_file_header
%strong

View file

@ -1,3 +1,4 @@
<% bash_lexer = Pygments::Lexer[:bash] %>
<div class="">
<div class="git-empty">
<h2>Git global setup:</h2>
@ -6,7 +7,7 @@ git config --global user.name "#{current_user.name}"
git config --global user.email "#{current_user.email}"
eos
%>
<%= raw Albino.colorize(setup_str, :bash) %>
<%= raw bash_lexer.highlight(setup_str) %>
<br />
<br />
<h2>Next steps:</h2>
@ -21,7 +22,7 @@ git remote add origin #{@project.url_to_repo}
git push -u origin master
eos
%>
<%= raw Albino.colorize(repo_setup_str, :bash) %>
<%= raw bash_lexer.highlight(repo_setup_str) %>
<br /><br />
<h2>Existing Git Repo?</h2>
@ -31,7 +32,7 @@ git remote add origin #{@project.url_to_repo}
git push -u origin master
eos
%>
<%= raw Albino.colorize(exist_repo_setup_str, :bash) %>
<%= raw bash_lexer.highlight(exist_repo_setup_str) %>
<br /><br />
<h2>Remove this project?</h2>