Why is it that when I run mix docs
, I get this error
warning: ExDoc.Markdown.Earmark (warning) lib/key/hd/mnemonic_seed/wordlist.ex:39 Illegal attributes ["\"absurd\"", "8,", "found,"] ignored in IAL
for this function ?
Seems like ExDoc.Markdown.Earmark
doesn’t like atoms somehow…
1 Like
Seems like this has been an issue for a while:
opened 08:35AM - 24 Apr 17 UTC
closed 09:32AM - 28 May 17 UTC
I'm getting a bunch of errors when running `mix docs` on a project I'm working o… n:
```
apps/relay/lib/relay/registry/pipelines.ex:14: warning: Illegal attributes ["pid", "ok,"] ignored in IAL
apps/relay/lib/relay/registry/locations.ex:14: warning: Illegal attributes ["pid", "ok,"] ignored in IAL
apps/relay/lib/relay/location_service/irc/supervisor.ex:14: warning: Illegal attributes ["pid", "ok,"] ignored in IAL
apps/relay/lib/relay/dispatch.ex:14: warning: Illegal attributes ["pid", "ok,"] ignored in IAL
apps/relay/lib/relay/registry/locations.ex:14: warning: Illegal attributes ["pid", "ok,"] ignored in IAL
apps/relay/lib/relay/dispatch.ex:14: warning: Illegal attributes ["pid", "ok,"] ignored in IAL
apps/relay/lib/relay/registry/locations.ex:14: warning: Illegal attributes ["pid", "ok,"] ignored in IAL
apps/relay/lib/relay/dispatch.ex:14: warning: Illegal attributes ["pid", "ok,"] ignored in IAL
apps/relay/lib/relay/registry/locations.ex:14: warning: Illegal attributes ["pid", "ok,"] ignored in IAL
apps/relay/lib/relay/dispatch.ex:14: warning: Illegal attributes ["pid", "ok,"] ignored in IAL
```
But I'm not sure what the cause of this issue is. It seems to be occurring from this package. Any tips appreciated
One thing that stands out: both doctests and code-blocks use a four space indent, starting from the surrounding content. Your example only indents two spaces:
3 Likes
I’ve indented it further to 4, and the warning disappeared!
Thanks al2o3cr!
Will reindent, but that’s definitely not ideal…
One could discuss if IAL makes sense for ex_doc
maybe you should discuss it with them, however the correct way to escape IAL is as follows
iex(9)> EarmarkParser.as_ast("a\n\\{:a, 1}")
{:ok, [{"p", [], ["a\n{:a, 1}"], %{}}], []}
Sinc
June 3, 2025, 6:28pm
5
I found that this error can also occur for some tuples in @doc code:
Perform a license check.
## Arguments
* The first argument is the result of the license check.
* The second argument is {params, socket.assigns}
## Return
* true for success
* {:error, error_atom} for failure.
Only the line containing {:error, error_atom}
generated a warning, and interestingly complaining about the two parts in reverse order (as they were for RooSoft). Adding back ticks around the tuple resolved the issue for me.