@@ -249,7 +249,14 @@ defmodule ExDoc.Retriever do
249
249
( source_doc && doc_ast ( content_type , source_doc , file: source . path , line: doc_line + 1 ) ) ||
250
250
function_data . doc_fallback . ( )
251
251
252
- group = GroupMatcher . match_function ( groups_for_docs , metadata )
252
+ group =
253
+ GroupMatcher . match_function (
254
+ groups_for_docs ,
255
+ Map . merge (
256
+ % { kind: type , name: name , arity: arity , module: module_data . module } ,
257
+ metadata
258
+ )
259
+ )
253
260
254
261
% ExDoc.FunctionNode {
255
262
id: nil_or_name ( name , arity ) ,
@@ -323,7 +330,15 @@ defmodule ExDoc.Retriever do
323
330
doc_ast = doc_ast ( content_type , source_doc , file: source . path , line: doc_line + 1 )
324
331
325
332
metadata = Map . put ( metadata , :__doc__ , :callback )
326
- group = GroupMatcher . match_function ( groups_for_docs , metadata )
333
+
334
+ group =
335
+ GroupMatcher . match_function (
336
+ groups_for_docs ,
337
+ Map . merge (
338
+ % { kind: kind , name: name , arity: arity , module: module_data . module } ,
339
+ metadata
340
+ )
341
+ )
327
342
328
343
% ExDoc.FunctionNode {
329
344
id: "c:" <> nil_or_name ( name , arity ) ,
@@ -355,7 +370,7 @@ defmodule ExDoc.Retriever do
355
370
356
371
defp get_type ( type_entry , source , groups_for_docs , module_data , annotations_for_docs ) do
357
372
{ :docs_v1 , _ , _ , content_type , _ , module_metadata , _ } = module_data . docs
358
- { { _ , name , arity } , anno , _signature , source_doc , metadata } = type_entry
373
+ { { kind , name , arity } , anno , _signature , source_doc , metadata } = type_entry
359
374
doc_line = anno_line ( anno )
360
375
source = anno_file ( anno , source )
361
376
annotations = annotations_from_metadata ( metadata , module_metadata )
@@ -369,7 +384,15 @@ defmodule ExDoc.Retriever do
369
384
370
385
doc_ast = doc_ast ( content_type , source_doc , file: source . path , line: doc_line + 1 )
371
386
metadata = Map . put ( metadata , :__doc__ , :type )
372
- group = GroupMatcher . match_function ( groups_for_docs , metadata )
387
+
388
+ group =
389
+ GroupMatcher . match_function (
390
+ groups_for_docs ,
391
+ Map . merge (
392
+ % { kind: kind , name: name , arity: arity , module: module_data . module } ,
393
+ metadata
394
+ )
395
+ )
373
396
374
397
% ExDoc.TypeNode {
375
398
id: "t:" <> nil_or_name ( name , arity ) ,
0 commit comments