Skip to content

Commit 80a9b66

Browse files
committed
Simplify docs
1 parent a62675e commit 80a9b66

File tree

2 files changed

+4
-24
lines changed

2 files changed

+4
-24
lines changed

README.md

Lines changed: 3 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -238,34 +238,14 @@ end
238238
defp before_closing_body_tag(:epub), do: ""
239239
```
240240

241-
You could use `MFA` as well:
241+
Besides an anonymous function, you can also pass a `module-function-args` tuple. It will the given module and function, with the format prefixed to the arguments:
242242

243243
```elixir
244244
docs: [
245245
# ...
246-
before_closing_head_tag: {MyModule, :before_closing_head_tag, ["Demo"]},
247-
before_closing_body_tag: {MyModule, :before_closing_body_tag, ["Demo"]}
246+
before_closing_head_tag: {MyModule, :before_closing_head_tag, []},
247+
before_closing_body_tag: {MyModule, :before_closing_body_tag, []}
248248
]
249-
250-
# ...
251-
252-
defmodule MyModule do
253-
def before_closing_head_tag(:html, name) do
254-
# ...
255-
end
256-
257-
def before_closing_head_tag(:epub, name) do
258-
# ...
259-
end
260-
261-
def before_closing_body_tag(:html, name) do
262-
# ...
263-
end
264-
265-
def before_closing_body_tag(:html, name) do
266-
# ...
267-
end
268-
end
269249
```
270250

271251
### Rendering Math

mix.lock

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
%{
2-
"earmark_parser": {:hex, :earmark_parser, "1.4.19", "de0d033d5ff9fc396a24eadc2fcf2afa3d120841eb3f1004d138cbf9273210e8", [:mix], [], "hexpm", "527ab6630b5c75c3a3960b75844c314ec305c76d9899bb30f71cb85952a9dc45"},
2+
"earmark_parser": {:hex, :earmark_parser, "1.4.31", "a93921cdc6b9b869f519213d5bc79d9e218ba768d7270d46fdcf1c01bacff9e2", [:mix], [], "hexpm", "317d367ee0335ef037a87e46c91a2269fef6306413f731e8ec11fc45a7efd059"},
33
"floki": {:hex, :floki, "0.32.0", "f915dc15258bc997d49be1f5ef7d3992f8834d6f5695270acad17b41f5bcc8e2", [:mix], [{:html_entities, "~> 0.5.0", [hex: :html_entities, repo: "hexpm", optional: false]}], "hexpm", "1c5a91cae1fd8931c26a4826b5e2372c284813904c8bacb468b5de39c7ececbd"},
44
"html_entities": {:hex, :html_entities, "0.5.2", "9e47e70598da7de2a9ff6af8758399251db6dbb7eebe2b013f2bbd2515895c3c", [:mix], [], "hexpm", "c53ba390403485615623b9531e97696f076ed415e8d8058b1dbaa28181f4fdcc"},
55
"jason": {:hex, :jason, "1.2.0", "10043418c42d2493d0ee212d3fddd25d7ffe484380afad769a0a38795938e448", [:mix], [{:decimal, "~> 1.0", [hex: :decimal, repo: "hexpm", optional: true]}], "hexpm", "116747dbe057794c3a3e4e143b7c8390b29f634e16c78a7f59ba75bfa6852e7f"},

0 commit comments

Comments
 (0)