Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/ex_doc/markdown.ex
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ defmodule ExDoc.Markdown do
Converts the given markdown document to HTML.
"""
def to_html(text, opts \\ []) when is_binary(text) do
pretty_codeblocks(get_markdown_processor().to_html(text, opts))
get_markdown_processor().to_html(text, opts)
end

@doc """
Expand Down
2 changes: 1 addition & 1 deletion lib/ex_doc/markdown/cmark.ex
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,6 @@ defmodule ExDoc.Markdown.Cmark do
Generate HTML output. Cmark takes no options.
"""
def to_html(text, _opts) do
Cmark.to_html(text)
Cmark.to_html(text) |> ExDoc.Markdown.pretty_codeblocks
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@tmbb This is a nitpick, but it should be:

text |> Cmark.to_html() |> ExDoc.Markdown.pretty_codeblocks()

end
end
2 changes: 1 addition & 1 deletion lib/ex_doc/markdown/earmark.ex
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,6 @@ defmodule ExDoc.Markdown.Earmark do
file: Keyword.get(opts, :file),
breaks: Keyword.get(opts, :breaks, false),
smartypants: Keyword.get(opts, :smartypants, true))
Earmark.as_html!(text, options)
Earmark.as_html!(text, options) |> ExDoc.Markdown.pretty_codeblocks
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@tmbb Another nitpick:

text |> Earmark.as_html!(options) |> ExDoc.Markdown.pretty_codeblocks()

end
end