Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dzaporozhets@sphereconsultinginc.com>2011-10-21 16:35:42 +0400
committerDmitriy Zaporozhets <dzaporozhets@sphereconsultinginc.com>2011-10-21 16:35:42 +0400
commitd352717cb3d4af275e3bcde9df9826a1cedc6dac (patch)
tree713a5e2f213b7b50dc0cab1a74692dd39a91138d /app
parent66c6782361d49ef2c9c4be912016c7c24cc42c8f (diff)
moved from albino -> pygments.rb
Diffstat (limited to 'app')
-rw-r--r--app/models/snippet.rb3
-rw-r--r--app/views/projects/_tree_file.html.haml1
-rw-r--r--app/views/projects/empty.html.erb7
3 files changed, 6 insertions, 5 deletions
diff --git a/app/models/snippet.rb b/app/models/snippet.rb
index 119b69a4525..95d6a07d545 100644
--- a/app/models/snippet.rb
+++ b/app/models/snippet.rb
@@ -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
diff --git a/app/views/projects/_tree_file.html.haml b/app/views/projects/_tree_file.html.haml
index ae95d483175..41a2287aa8c 100644
--- a/app/views/projects/_tree_file.html.haml
+++ b/app/views/projects/_tree_file.html.haml
@@ -1,3 +1,4 @@
+:css
.view_file
.view_file_header
%strong
diff --git a/app/views/projects/empty.html.erb b/app/views/projects/empty.html.erb
index a8917471550..4c60facde8c 100644
--- a/app/views/projects/empty.html.erb
+++ b/app/views/projects/empty.html.erb
@@ -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>