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…
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:
2 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}"], %{}}], []}