diff --git a/assets/js/epub.js b/assets/js/epub.js
index 573eaaaaf..678dc9403 100644
--- a/assets/js/epub.js
+++ b/assets/js/epub.js
@@ -4,4 +4,3 @@
import hljs from 'highlight.js/build/highlight.pack'
hljs.initHighlightingOnLoad()
-
diff --git a/lib/ex_doc/markdown/cmark.ex b/lib/ex_doc/markdown/cmark.ex
index 031810f55..2696cd45e 100644
--- a/lib/ex_doc/markdown/cmark.ex
+++ b/lib/ex_doc/markdown/cmark.ex
@@ -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) |> ExDoc.Markdown.pretty_codeblocks
+ text |> Cmark.to_html() |> ExDoc.Markdown.pretty_codeblocks()
end
end
diff --git a/lib/ex_doc/markdown/earmark.ex b/lib/ex_doc/markdown/earmark.ex
index d9eb07458..17862e13d 100644
--- a/lib/ex_doc/markdown/earmark.ex
+++ b/lib/ex_doc/markdown/earmark.ex
@@ -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) |> ExDoc.Markdown.pretty_codeblocks
+ text |> Earmark.as_html!(options) |> ExDoc.Markdown.pretty_codeblocks()
end
end
diff --git a/lib/ex_doc/retriever.ex b/lib/ex_doc/retriever.ex
index cefd59cad..1383ddf78 100644
--- a/lib/ex_doc/retriever.ex
+++ b/lib/ex_doc/retriever.ex
@@ -433,8 +433,8 @@ defmodule ExDoc.Retriever do
end
end
- defp anno_line(line) when is_integer(line), do: line |> abs()
- defp anno_line(anno), do: :erl_anno.line(anno) |> abs()
+ defp anno_line(line) when is_integer(line), do: abs(line)
+ defp anno_line(anno), do: anno |> :erl_anno.line() |> abs()
# Detect if a module is an exception, struct,
# protocol, implementation or simply a module
diff --git a/test/ex_doc/formatter/html_test.exs b/test/ex_doc/formatter/html_test.exs
index 585e38913..dfc0c1946 100644
--- a/test/ex_doc/formatter/html_test.exs
+++ b/test/ex_doc/formatter/html_test.exs
@@ -130,9 +130,9 @@ defmodule ExDoc.Formatter.HTMLTest do
assert File.regular?("#{output_dir()}/CompiledWithDocs.html")
assert File.regular?("#{output_dir()}/CompiledWithDocs.Nested.html")
- assert [_] = "#{output_dir()}/dist/app-*.css" |> Path.wildcard
- assert [_] = "#{output_dir()}/dist/app-*.js" |> Path.wildcard
- assert [] = "#{output_dir()}/another_dir/dist/app-*.js.map" |> Path.wildcard
+ assert [_] = Path.wildcard("#{output_dir()}/dist/app-*.css")
+ assert [_] = Path.wildcard("#{output_dir()}/dist/app-*.js")
+ assert [] = Path.wildcard("#{output_dir()}/another_dir/dist/app-*.js.map")
content = File.read!("#{output_dir()}/index.html")
assert content =~ ~r{}
@@ -145,9 +145,9 @@ defmodule ExDoc.Formatter.HTMLTest do
assert File.regular?("#{output_dir()}/another_dir/CompiledWithDocs.html")
assert File.regular?("#{output_dir()}/another_dir/RandomError.html")
- assert [_] = "#{output_dir()}/another_dir/dist/app-*.css" |> Path.wildcard
- assert [_] = "#{output_dir()}/another_dir/dist/app-*.js" |> Path.wildcard
- assert [_] = "#{output_dir()}/another_dir/dist/app-*.js.map" |> Path.wildcard
+ assert [_] = Path.wildcard("#{output_dir()}/another_dir/dist/app-*.css")
+ assert [_] = Path.wildcard("#{output_dir()}/another_dir/dist/app-*.js")
+ assert [_] = Path.wildcard("#{output_dir()}/another_dir/dist/app-*.js.map")
content = File.read!("#{output_dir()}/another_dir/index.html")
assert content =~ ~r{}
@@ -228,7 +228,7 @@ defmodule ExDoc.Formatter.HTMLTest do
test "before_closing_*_tags are placed in the right place - generated pages" do
config = doc_config([main: "readme"])
generate_docs(config)
-
+
content = File.read!("#{output_dir()}/readme.html")
assert content =~ ~r[#{@before_closing_head_tag_content_html}\s*]
assert content =~ ~r[#{@before_closing_body_tag_content_html}\s*