diff --git a/lib/docs/filters/nim/entries.rb b/lib/docs/filters/nim/entries.rb index e5ef24ef..27d32dfe 100644 --- a/lib/docs/filters/nim/entries.rb +++ b/lib/docs/filters/nim/entries.rb @@ -54,8 +54,8 @@ module Docs else css('.simple-toc-section a, .nested-toc-section a').each do |node| - entry_name = node.content - entry_name.gsub!(/(\(|\[).*/, '') + match = /^`(.*)`|^(\w+)/.match(node.content) + entry_name = match[1] || match[2] entry_id = slug + node['href'] entries << [entry_name, entry_id, name]