[devdocsgjs/main: 876/1867] julia: remove duplicate entries
- From: Andy Holmes <andyholmes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [devdocsgjs/main: 876/1867] julia: remove duplicate entries
- Date: Fri, 19 Nov 2021 23:47:33 +0000 (UTC)
commit 79260c29ea2c4a13d6d7e373fd83981550b6c6c5
Author: Jasper van Merle <jaspervmerle gmail com>
Date: Fri Aug 23 00:18:02 2019 +0200
julia: remove duplicate entries
lib/docs/filters/julia/entries.rb | 11 +++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)
---
diff --git a/lib/docs/filters/julia/entries.rb b/lib/docs/filters/julia/entries.rb
index 46be86c9..f9774394 100644
--- a/lib/docs/filters/julia/entries.rb
+++ b/lib/docs/filters/julia/entries.rb
@@ -16,14 +16,21 @@ module Docs
def additional_entries
return [] unless slug.start_with?('stdlib')
- css('.docstring-binding[id]').map do |node|
+ entries = []
+ used_names = {}
+
+ css('.docstring-binding[id]').each do |node|
name = node.content
name.gsub! '.:', '.'
name.remove! 'Base.'
category = node.parent.at_css('.docstring-category').content
name << '()' if category == 'Function' || category == 'Method'
- [name, node['id']]
+
+ entries << [name, node['id']] unless used_names.key?(name)
+ used_names[name] = true
end
+
+ entries
end
end
end
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]