Skip to content

Commit

Permalink
Minor refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
Dawa Ometto committed Aug 1, 2023
1 parent f5da8d5 commit 98fd9c4
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions lib/gollum-lib/filter/tags.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 98fd9c4

Please sign in to comment.