-
Notifications
You must be signed in to change notification settings - Fork 325
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Html in markdown generates 4 element tuple #1165
Comments
Good catch, thank you for the report. I think it's ok to ignore the 4th element in the tuple for now and revisit it later when we'd use Earmark to transform ast back to html (then the extra info in the 4th element might be useful). Could you send a PR that ignores the 4th element? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
In building the documentation for a package I came across an error in ExDoc when there was html in the markdown. This was the simplest test-case I found:
ExDoc.Markdown.to_ast("<p>\nTest\n</p>", [])
, calls into Earmark and it returns a 4 element tuple with%{meta: %{verbatim: true}}
in the fourth element.This is not being matched by
ExDoc.Markdown.Earmark.fixup/1
, see error below. Easy fix is to match it there and pass through the 4-element tuple but this leads to failures in other places the ast is walked over, e.g.ex_doc/lib/ex_doc/autolink.ex
Line 84 in d272497
Other option is to ignore the fourth element and let
fix_up/1
return a three element tuple but don't know the implications of that. Esp given this discussion in pragdave/earmark#337The text was updated successfully, but these errors were encountered: