From 5fef97636a2c4c6289960044350b7800f2eef0ed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jon=20B=C3=B6rjesson?= Date: Fri, 17 Jan 2025 09:16:05 +0100 Subject: [PATCH] Use fully qualified name --- lib/docs/filters/crystal/entries.rb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/docs/filters/crystal/entries.rb b/lib/docs/filters/crystal/entries.rb index 3727bdf2..151efbdc 100644 --- a/lib/docs/filters/crystal/entries.rb +++ b/lib/docs/filters/crystal/entries.rb @@ -16,8 +16,12 @@ module Docs name else return at_css('h1').content.strip unless at_css('.type-name') - name = at_css('.type-name').children.last.content.strip + name = at_css('.type-name').children.reject { |n| n.matches?('.kind') } + name.map! { |n| n.text.strip } + name.reject! &:empty? + name = name.join name.remove! %r{\(.*\)} + name.strip! name end end