History

Merge pull request #1430 from scherepn/pytorch-fix

Fix broken PyTorch scraper

Simon Legner committed 5 years ago

Commit e6baef32 parents 2c09c3b fa407af1 file · +3 −2Browse files

Unified · Split

lib/docs/filters/pytorch/entries.rb+3−2
@@ -13,8 +13,9 @@ module Docs · 12 unmodified lines
1313 # The id of the container `div.section` indicates the page type.
1414 # If the id starts with `module-`, then it's an API reference,
1515 # otherwise it is a note or design doc.
16− if at_css('.section')['id'].starts_with? 'module-'
17− /\Amodule-(.*)/.match(article_id)[1]
16+ section_id = at_css('.section')['id']
17+ if section_id.starts_with? 'module-'
18+ section_id.remove('module-')
1819 else
1920 name = get_breadcrumbs()[1]
2021 NAME_REPLACEMENTS.fetch(name, name)