From f131e1a873a11cde55cc214717f7b19ee300653e Mon Sep 17 00:00:00 2001 From: sharpevo Date: Mon, 20 Nov 2023 22:06:50 +0800 Subject: [PATCH] Fix the regexp for Golang generic functions --- lib/docs/filters/go/entries.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/docs/filters/go/entries.rb b/lib/docs/filters/go/entries.rb index e125b8fe..3d1c9d2c 100644 --- a/lib/docs/filters/go/entries.rb +++ b/lib/docs/filters/go/entries.rb @@ -28,7 +28,7 @@ module Docs case node.content when /type\ (\w+)/ name = "#{package}.#{$1}" - when /func\ (?:\(.+\)\ )?(\w+)\(/ + when /func\ (?:\(.+\)\ )?(\w+)[\(\[]/ name = "#{$1}()" name.prepend "#{$1}." if node['href'] =~ /#(\w+)\.#{$1}/ name.prepend "#{package}."