Commit 38fec049 authored by maeda's avatar maeda

Allow to link to an anchor of the current wiki page (#16313).

Patch by Holger Just.


git-svn-id: https://svn.redmine.org/redmine/trunk@17345 e93f8b46-1217-0410-a6f0-8f06a7374b81
parent 6935e134
......@@ -740,6 +740,12 @@ module ApplicationHelper
link_project = project
esc, all, page, title = $1, $2, $3, $5
if esc.nil?
if page =~ /^\#(.+)$/
anchor = sanitize_anchor_name($1)
url = "##{anchor}"
next link_to(title.present? ? title.html_safe : h(page), url, :class => 'wiki-page')
end
if page =~ /^([^\:]+)\:(.*)$/
identifier, page = $1, $2
link_project = Project.find_by_identifier(identifier) || Project.find_by_name(identifier)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment