Commit 461500d4 authored by Sylvester Keil's avatar Sylvester Keil

Strip relative option just once

See #124
parent 43b35887
...@@ -55,15 +55,15 @@ module Jekyll ...@@ -55,15 +55,15 @@ module Jekyll
opts.on('-q', '--query QUERY') do |query| opts.on('-q', '--query QUERY') do |query|
@query = query @query = query
end end
opts.on('-p', '--prefix PREFIX') do |prefix| opts.on('-p', '--prefix PREFIX') do |prefix|
@prefix = prefix @prefix = prefix
end end
opts.on('-r', '--relative RELATIVE') do |relative| opts.on('-r', '--relative RELATIVE') do |relative|
@relative = relative @relative = relative.to_s.strip
end end
opts.on('-t', '--text TEXT') do |text| opts.on('-t', '--text TEXT') do |text|
@text = text @text = text
...@@ -575,7 +575,7 @@ module Jekyll ...@@ -575,7 +575,7 @@ module Jekyll
end end
def link_target_for key def link_target_for key
"#{base_url}#{relative.to_s.strip}##{[prefix, key].compact.join('-')}" "#{base_url}#{relative}##{[prefix, key].compact.join('-')}"
end end
def cite(keys) def cite(keys)
......
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