mirror of
https://github.com/ash-project/ash_hq.git
synced 2024-09-19 12:53:49 +12:00
improvement: struct type mapping
This commit is contained in:
parent
6d6ed9b860
commit
4b8206154a
2 changed files with 5 additions and 0 deletions
|
@ -436,6 +436,9 @@ defmodule AshHq.Docs.Extensions.RenderMarkdown.PostProcessors.Highlighter do
|
|||
)
|
||||
|
||||
~s(<code class="not-prose makeup #{lang} highlight">#{highlighted}</code>)
|
||||
rescue
|
||||
_ ->
|
||||
~s(<code class="text-black dark:text-white">#{code}</code>)
|
||||
end
|
||||
|
||||
entities = [{"&", ?&}, {"<", ?<}, {">", ?>}, {""", ?"}, {"'", ?'}]
|
||||
|
|
|
@ -542,6 +542,8 @@ defmodule Utils do
|
|||
defp type(:mfa), do: "MFA"
|
||||
defp type(:mod_arg), do: "Module and Arguments"
|
||||
defp type(:map), do: "Map"
|
||||
defp type(:struct), do: "Struct"
|
||||
defp type({:struct, struct}), do: "#{inspect(struct)}"
|
||||
defp type(nil), do: "nil"
|
||||
defp type({:fun, arity}), do: "Function/#{arity}"
|
||||
defp type({:one_of, choices}), do: type({:in, choices})
|
||||
|
|
Loading…
Reference in a new issue