Browse Source

Update regex now that table of contents is in different format

Regex now removes anything that comes after [ or (
Jake Leahy 1 year ago
parent
commit
c2a47b323f
1 changed files with 2 additions and 1 deletions
  1. 2 1
      lib/docs/filters/nim/entries.rb

+ 2 - 1
lib/docs/filters/nim/entries.rb

@@ -55,7 +55,8 @@ module Docs
 
           css('.simple-toc-section a, .nested-toc-section a').each do |node|
             entry_name = node.content
-            entry_name.gsub!(/,.*/, '')
+            entry_name.gsub!(/(\(|\[).*/, '')
+
             entry_id = slug + node['href']
             entries << [entry_name, entry_id, name]
           end