Class: Gollum::SiteMarkup

Inherits:
Markup
  • Object
show all
Defined in:
lib/gollum-site/markup.rb

Instance Method Summary collapse

Instance Method Details

#find_page_from_name(cname) ⇒ Object

Find a page from a given cname. If the page has an anchor (#) and has no match, strip the anchor and try again.

cname - The String canonical page name.

Returns a Gollum::Page instance if a page is found, or an Array of [Gollum::Page, String extra] if a page without the extra anchor data is found.



48
49
50
51
52
# File 'lib/gollum-site/markup.rb', line 48

def find_page_from_name(cname)
  if page = @wiki.page(cname, @version)
    return page
  end
end