How to change the markdown engine to generate docs in Elixir Project

47 views
Skip to first unread message

eksperimental

unread,
Jun 23, 2016, 4:42:43 PM6/23/16
to elixir-l...@googlegroups.com
Hi,
I have found three offending lines when running `make docs_elixir`, but
Earmark is unable to tell (yet) which file is causing trouble.

<no file>:42: warning: Closing unclosed backquotes ` at
end of input <no file>:392: warning: Closing unclosed backquotes ` at
end of input <no file>:36: warning: Closing unclosed backquotes ` at
end of input


I thought of changing the markdown engine to see if other engines will
give me the right info, but I couldn't figure out how.
Maybe we should add this feature to the ExDoc CLI.

any hints are appreciated

José Valim

unread,
Jun 23, 2016, 5:47:06 PM6/23/16
to elixir-l...@googlegroups.com
My advice would be to change it in the source. Maybe there is a config in mix.exs. I don't think an option is worth it because it wouldn't likely be possible to use it by any project besides Elixir.
--
You received this message because you are subscribed to the Google Groups "elixir-lang-core" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elixir-lang-co...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elixir-lang-core/20160624034228.3d8b73ad.eksperimental%40autistici.org.
For more options, visit https://groups.google.com/d/optout.


--


José Valim
Skype: jv.ptec
Founder and Director of R&D

José Valim

unread,
Jun 23, 2016, 5:47:18 PM6/23/16
to elixir-l...@googlegroups.com
And thank you for looking into this!


On Thursday, June 23, 2016, eksperimental <eksper...@autistici.org> wrote:
--
You received this message because you are subscribed to the Google Groups "elixir-lang-core" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elixir-lang-co...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elixir-lang-core/20160624034228.3d8b73ad.eksperimental%40autistici.org.
For more options, visit https://groups.google.com/d/optout.

eksperimental

unread,
Jun 23, 2016, 5:55:49 PM6/23/16
to elixir-l...@googlegroups.com
why wouldn't it be possible for other projects to set the markdown
engine throuhg the CLI?
I tried hacking ex_doc to use cmark, but it doens't
seem to work as earmark now is a required dependency.
What i used to do before was to remove the other dependencies in the
deps/ folder

I haven't hacked in ex_docs in a while, so Im a bit out of touch. ;-p

On Thu, 23 Jun 2016 23:47:04 +0200
José Valim <jose....@plataformatec.com.br> wrote:

> My advice would be to change it in the source. Maybe there is a
> config in mix.exs. I don't think an option is worth it because it
> wouldn't likely be possible to use it by any project besides Elixir.
>
> On Thursday, June 23, 2016, eksperimental
> <eksper...@autistici.org> wrote:
>
> > Hi,
> > I have found three offending lines when running `make docs_elixir`,
> > but Earmark is unable to tell (yet) which file is causing trouble.
> >
> > <no file>:42: warning: Closing unclosed backquotes ` at
> > end of input <no file>:392: warning: Closing unclosed backquotes `
> > at end of input <no file>:36: warning: Closing unclosed backquotes
> > ` at end of input
> >
> >
> > I thought of changing the markdown engine to see if other engines
> > will give me the right info, but I couldn't figure out how.
> > Maybe we should add this feature to the ExDoc CLI.
> >
> > any hints are appreciated
> >
> > --
> > You received this message because you are subscribed to the Google
> > Groups "elixir-lang-core" group.
> > To unsubscribe from this group and stop receiving emails from it,
> > send an email to elixir-lang-co...@googlegroups.com
> > <javascript:;>. To view this discussion on the web visit

eksperimental

unread,
Jun 23, 2016, 5:56:48 PM6/23/16
to elixir-l...@googlegroups.com
On Thu, 23 Jun 2016 23:47:17 +0200
José Valim <jose....@plataformatec.com.br> wrote:

> And thank you for looking into this!

sure, no worries.
always a pleasure to contribute to Elixir

José Valim

unread,
Jun 23, 2016, 6:52:20 PM6/23/16
to elixir-l...@googlegroups.com
why wouldn't it be possible for other projects to set the markdown
engine throuhg the CLI?

Because only Elixir uses it from the command line at this point and, even if we make it available with the upcoming mix escript.install feature, c dependencies can't be bundled in escripts, so the other alternative is pandoc.

For changing the processes, just change this function and call what you want directly: https://github.com/elixir-lang/ex_doc/blob/master/lib/ex_doc/markdown.ex#L35

You can also add a config file and set the proper application key.
Reply all
Reply to author
Forward
0 new messages