Skip to content

Commit

Permalink
Simplify docs
Browse files Browse the repository at this point in the history
  • Loading branch information
josevalim committed Mar 6, 2023
1 parent a62675e commit 80a9b66
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 24 deletions.
26 changes: 3 additions & 23 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -238,34 +238,14 @@ end
defp before_closing_body_tag(:epub), do: ""
```

You could use `MFA` as well:
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:

```elixir
docs: [
# ...
before_closing_head_tag: {MyModule, :before_closing_head_tag, ["Demo"]},
before_closing_body_tag: {MyModule, :before_closing_body_tag, ["Demo"]}
before_closing_head_tag: {MyModule, :before_closing_head_tag, []},
before_closing_body_tag: {MyModule, :before_closing_body_tag, []}
]
# ...
defmodule MyModule do
def before_closing_head_tag(:html, name) do
# ...
end
def before_closing_head_tag(:epub, name) do
# ...
end
def before_closing_body_tag(:html, name) do
# ...
end
def before_closing_body_tag(:html, name) do
# ...
end
end
```

### Rendering Math
Expand Down
2 changes: 1 addition & 1 deletion mix.lock
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
%{
"earmark_parser": {:hex, :earmark_parser, "1.4.19", "de0d033d5ff9fc396a24eadc2fcf2afa3d120841eb3f1004d138cbf9273210e8", [:mix], [], "hexpm", "527ab6630b5c75c3a3960b75844c314ec305c76d9899bb30f71cb85952a9dc45"},
"earmark_parser": {:hex, :earmark_parser, "1.4.31", "a93921cdc6b9b869f519213d5bc79d9e218ba768d7270d46fdcf1c01bacff9e2", [:mix], [], "hexpm", "317d367ee0335ef037a87e46c91a2269fef6306413f731e8ec11fc45a7efd059"},
"floki": {:hex, :floki, "0.32.0", "f915dc15258bc997d49be1f5ef7d3992f8834d6f5695270acad17b41f5bcc8e2", [:mix], [{:html_entities, "~> 0.5.0", [hex: :html_entities, repo: "hexpm", optional: false]}], "hexpm", "1c5a91cae1fd8931c26a4826b5e2372c284813904c8bacb468b5de39c7ececbd"},
"html_entities": {:hex, :html_entities, "0.5.2", "9e47e70598da7de2a9ff6af8758399251db6dbb7eebe2b013f2bbd2515895c3c", [:mix], [], "hexpm", "c53ba390403485615623b9531e97696f076ed415e8d8058b1dbaa28181f4fdcc"},
"jason": {:hex, :jason, "1.2.0", "10043418c42d2493d0ee212d3fddd25d7ffe484380afad769a0a38795938e448", [:mix], [{:decimal, "~> 1.0", [hex: :decimal, repo: "hexpm", optional: true]}], "hexpm", "116747dbe057794c3a3e4e143b7c8390b29f634e16c78a7f59ba75bfa6852e7f"},
Expand Down

0 comments on commit 80a9b66

Please sign in to comment.