|
|
@ -13,8 +13,9 @@ module Docs
|
|
|
|
# The id of the container `div.section` indicates the page type.
|
|
|
|
# The id of the container `div.section` indicates the page type.
|
|
|
|
# If the id starts with `module-`, then it's an API reference,
|
|
|
|
# If the id starts with `module-`, then it's an API reference,
|
|
|
|
# otherwise it is a note or design doc.
|
|
|
|
# otherwise it is a note or design doc.
|
|
|
|
if at_css('.section')['id'].starts_with? 'module-'
|
|
|
|
section_id = at_css('.section')['id']
|
|
|
|
/\Amodule-(.*)/.match(article_id)[1]
|
|
|
|
if section_id.starts_with? 'module-'
|
|
|
|
|
|
|
|
section_id.remove('module-')
|
|
|
|
else
|
|
|
|
else
|
|
|
|
name = get_breadcrumbs()[1]
|
|
|
|
name = get_breadcrumbs()[1]
|
|
|
|
NAME_REPLACEMENTS.fetch(name, name)
|
|
|
|
NAME_REPLACEMENTS.fetch(name, name)
|
|
|
|