Commit d4aeac70 authored by elotroalex's avatar elotroalex

added small r to the regex and removed edit comments

parent 1e128bf2
...@@ -17,7 +17,6 @@ module Jekyll ...@@ -17,7 +17,6 @@ module Jekyll
# #site readers # #site readers
module Utilities module Utilities
#elotroalex edit: added local variable relative
attr_reader :config, :site, :context, :prefix, :text, :offset, :max, :relative attr_reader :config, :site, :context, :prefix, :text, :offset, :max, :relative
...@@ -62,8 +61,6 @@ module Jekyll ...@@ -62,8 +61,6 @@ module Jekyll
@prefix = prefix @prefix = prefix
end end
# elotroalex edit: added flag for relative url for link_to
opts.on('-r', '--relative RELATIVE') do |relative| opts.on('-r', '--relative RELATIVE') do |relative|
@relative = relative @relative = relative
end end
...@@ -93,7 +90,7 @@ module Jekyll ...@@ -93,7 +90,7 @@ module Jekyll
end end
end end
argv = arguments.split(/(\B-[cCfqptTslomA]|\B--(?:cited(_in_order)?|file|query|relative|prefix|text|style|template|locator|offset|max|suppress_author|))/) argv = arguments.split(/(\B-[cCfqrptTslomA]|\B--(?:cited(_in_order)?|file|query|relative|prefix|text|style|template|locator|offset|max|suppress_author|))/)
parser.parse argv.map(&:strip).reject(&:empty?) parser.parse argv.map(&:strip).reject(&:empty?)
end end
...@@ -577,8 +574,6 @@ module Jekyll ...@@ -577,8 +574,6 @@ module Jekyll
(context['citation_numbers'] ||= {})[key] ||= cited_keys.length (context['citation_numbers'] ||= {})[key] ||= cited_keys.length
end end
# #elotroalex edit: Added new method to control href output for cite
def link_target_for key def link_target_for key
"#{relative}##{[prefix, key].compact.join('-')}" "#{relative}##{[prefix, key].compact.join('-')}"
end end
......
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