diff --git a/lib/gollum-lib/filter/tags.rb b/lib/gollum-lib/filter/tags.rb index 87268f30..978620ea 100644 --- a/lib/gollum-lib/filter/tags.rb +++ b/lib/gollum-lib/filter/tags.rb @@ -121,11 +121,8 @@ def process_include_tag(tag) len = INCLUDE_TAG.length return html_error('Cannot process include directive: no page name given') if tag.length <= len page_path = Pathname.new(tag[len..-1]) - resolved_page_name = if page_path.relative? - (Pathname.new(@markup.dir) + page_path).cleanpath.to_s - else - page_path.cleanpath.to_s - end + resolved_page = page_path.relative? ? (Pathname.new(@markup.dir) + page_path) : page_path + resolved_page_name = resolved_page.cleanpath.to_s if @markup.include_levels > 0 page = find_page_or_file_from_path(resolved_page_name) if page