Skip to content
This repository has been archived by the owner on Apr 19, 2019. It is now read-only.

Commit

Permalink
Handle nil slash.
Browse files Browse the repository at this point in the history
  • Loading branch information
bootstraponline committed Aug 23, 2012
1 parent 01fa477 commit 33ca329
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions lib/gollum/markup.rb
Expand Up @@ -448,9 +448,16 @@ def find_file(name)
# is found.
def find_page_from_name(cname)
slash = cname.rindex('/')
name = cname[slash+1..-1]
path = cname[0..slash]
if page = @wiki.paged(name, path)

unless slash.nil?
name = cname[slash+1..-1]
path = cname[0..slash]
page = @wiki.paged(name, path)
else
page = @wiki.page(cname)
end

if page
return page
end
if pos = cname.index('#')
Expand Down

0 comments on commit 33ca329

Please sign in to comment.