Skip to content

ExDoc assumes too much about the markdown modules #762

@tmbb

Description

@tmbb

The function ExDoc.Markdown.as_html/2 (https://github.com/elixir-lang/ex_doc/blob/master/lib/ex_doc/markdown.ex#L31) assumes that the markdown implementation will generate code blocks eant to be highlighted by javascript. It calls pretty_codeblocks/1 which mangles the resulting code blocks. This should be handled by the as_html/2 function in the markdown modules themselves (ExDoc.Markdown.{Cmark, Earmark, Hoedown}), which you alreade define. People who want to use custom implementations shoud render the code you want themselves.

I have a markdown implementation that highlights code using HTML and CSS (no javascript) and messing with the class of the code block is not very good in that case (I have my own css classes).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions