@@ -78,15 +78,15 @@ defmodule ElixirLS.LanguageServer.MarkdownUtils do
7878 "**Equivalent** #{ name } /#{ arity } "
7979 end
8080
81- defp get_metadata_entry_md ( { :deprecated , text } ) do
81+ defp get_metadata_entry_md ( { :deprecated , text } ) when is_binary ( text ) do
8282 "**Deprecated** #{ text } "
8383 end
8484
85- defp get_metadata_entry_md ( { :since , text } ) do
85+ defp get_metadata_entry_md ( { :since , text } ) when is_binary ( text ) do
8686 "**Since** #{ text } "
8787 end
8888
89- defp get_metadata_entry_md ( { :group , text } ) do
89+ defp get_metadata_entry_md ( { :group , text } ) when is_binary ( text ) do
9090 "**Group** #{ text } "
9191 end
9292
@@ -102,15 +102,15 @@ defmodule ElixirLS.LanguageServer.MarkdownUtils do
102102 "**Built-in**"
103103 end
104104
105- defp get_metadata_entry_md ( { :implementing , module } ) do
105+ defp get_metadata_entry_md ( { :implementing , module } ) when is_atom ( module ) do
106106 "**Implementing behaviour** #{ inspect ( module ) } "
107107 end
108108
109- defp get_metadata_entry_md ( { :implementing_module_app , app } ) do
109+ defp get_metadata_entry_md ( { :implementing_module_app , app } ) when is_atom ( app ) do
110110 "**Behaviour defined in application** #{ to_string ( app ) } "
111111 end
112112
113- defp get_metadata_entry_md ( { :app , app } ) do
113+ defp get_metadata_entry_md ( { :app , app } ) when is_atom ( app ) do
114114 "**Application** #{ to_string ( app ) } "
115115 end
116116
@@ -132,7 +132,7 @@ defmodule ElixirLS.LanguageServer.MarkdownUtils do
132132
133133 defp get_metadata_entry_md ( { :defaults , _ } ) , do: nil
134134
135- defp get_metadata_entry_md ( { :delegate_to , { m , f , a } } ) do
135+ defp get_metadata_entry_md ( { :delegate_to , { m , f , a } } ) when is_atom ( m ) and is_atom ( f ) and is_integer ( a ) do
136136 "**Delegates to** #{ inspect ( m ) } .#{ f } /#{ a } "
137137 end
138138
0 commit comments