Regex now removes anything that comes after [ or (
Unified · Split
| @@ -55,7 +55,8 @@ module Docs · 54 unmodified lines | |||
| 55 | 55 | ||
| 56 | css('.simple-toc-section a, .nested-toc-section a').each do |node| | 56 | css('.simple-toc-section a, .nested-toc-section a').each do |node| |
| 57 | entry_name = node.content | 57 | entry_name = node.content |
| 58 | entry_name.gsub!(/,.*/, '') | 58 | entry_name.gsub!(/(\(|\[).*/, '') |
| 59 | |||
| 59 | entry_id = slug + node['href'] | 60 | entry_id = slug + node['href'] |
| 60 | entries << [entry_name, entry_id, name] | 61 | entries << [entry_name, entry_id, name] |
| 61 | end | 62 | end |