diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb
index 7bb809991..2293fcdc0 100644
--- a/app/helpers/application_helper.rb
+++ b/app/helpers/application_helper.rb
@@ -142,17 +142,17 @@ module ApplicationHelper
# example:
# [[link]] -> "link":link
# [[link|title]] -> "title":link
- text = text.gsub(/\[\[([^\]\|]+)(\|([^\]\|]+))?\]\]/) {|m| "\"#{$3 || $1}\":" + format_wiki_link.call(Wiki.titleize($1)) }
+ text = text.gsub(/\[\[([^\]\|]+)(\|([^\]\|]+))?\]\]/) {|m| link_to(($3 || $1), format_wiki_link.call(Wiki.titleize($1)), :class => 'wiki-page') }
# turn issue ids into links
# example:
# #52 -> #52
- text = text.gsub(/#(\d+)(?=\b)/) {|m| link_to "##{$1}", :controller => 'issues', :action => 'show', :id => $1}
+ text = text.gsub(/#(\d+)(?=\b)/) {|m| link_to "##{$1}", {:controller => 'issues', :action => 'show', :id => $1}, :class => 'issue' }
# turn revision ids into links (@project needed)
# example:
# r52 -> r52 (@project.id is 6)
- text = text.gsub(/(?=\b)r(\d+)(?=\b)/) {|m| link_to "r#{$1}", :controller => 'repositories', :action => 'revision', :id => @project.id, :rev => $1} if @project
+ text = text.gsub(/(?=\b)r(\d+)(?=\b)/) {|m| link_to "r#{$1}", {:controller => 'repositories', :action => 'revision', :id => @project.id, :rev => $1}, :class => 'changeset' } if @project
# when using an image link, try to use an attachment, if possible
attachments = options[:attachments]
diff --git a/public/images/external.png b/public/images/external.png
new file mode 100644
index 000000000..0561752f4
Binary files /dev/null and b/public/images/external.png differ
diff --git a/public/stylesheets/application.css b/public/stylesheets/application.css
index 809bdd024..16206f001 100644
--- a/public/stylesheets/application.css
+++ b/public/stylesheets/application.css
@@ -639,6 +639,18 @@ div.wiki table, div.wiki td {
padding: 4px;
}
+div.wiki a {
+ background-position: 0% 60%;
+ background-repeat: no-repeat;
+ padding-left: 12px;
+ background-image: url(../images/external.png);
+}
+
+div.wiki a.wiki-page, div.wiki a.issue, div.wiki a.changeset {
+ padding-left: 0;
+ background-image: none;
+}
+
div.wiki code {
font-size: 1.2em;
}