@@ -119,12 +119,12 module ApplicationHelper | |||
|
119 | 119 | # turn issue ids to textile links |
|
120 | 120 | # example: |
|
121 | 121 | # #52 -> "#52":/issues/show/52 |
|
122 |
text = text.gsub(/#(\d+)( |
|
|
122 | text = text.gsub(/#(\d+)(?=\b)/) {|m| "\"##{$1}\":" + url_for(:controller => 'issues', :action => 'show', :id => $1) } | |
|
123 | 123 | |
|
124 | 124 | # turn revision ids to textile links (@project needed) |
|
125 | 125 | # example: |
|
126 | 126 | # r52 -> "r52":/repositories/revision/6?rev=52 (@project.id is 6) |
|
127 |
text = text.gsub(/r(\d+)( |
|
|
127 | text = text.gsub(/r(\d+)(?=\b)/) {|m| "\"r#{$1}\":" + url_for(:controller => 'repositories', :action => 'revision', :id => @project.id, :rev => $1) } if @project | |
|
128 | 128 | |
|
129 | 129 | # finally textilize text |
|
130 | 130 | text = (Setting.text_formatting == 'textile') && (ActionView::Helpers::TextHelper.method_defined? "textilize") ? auto_link(RedCloth.new(text, [:filter_html]).to_html) : simple_format(auto_link(h(text))) |
General Comments 0
You need to be logged in to leave comments.
Login now