History

Update regex now that table of contents is in different format

Regex now removes anything that comes after [ or (

Jake Leahy committed 2 years ago

Commit c2a47b31 parent abec0d91 file · +2 −1Browse files

Unified · Split

lib/docs/filters/nim/entries.rb+2−1
@@ -55,7 +55,8 @@ module Docs · 54 unmodified lines
5555
5656 css('.simple-toc-section a, .nested-toc-section a').each do |node|
5757 entry_name = node.content
58− entry_name.gsub!(/,.*/, '')
58+ entry_name.gsub!(/(\(|\[).*/, '')
59+
5960 entry_id = slug + node['href']
6061 entries << [entry_name, entry_id, name]
6162 end