Untitled notebook
Mix.install([{:docs_to_livebook, path: "#{__DIR__}/../"}, {:ex_doc, "~> 0.28.5"}])
import IEx.Helpers
Section
:application.get_key(:docs_to_livebook, :modules)
h(ExBook) |> IO.inspect()
docs = Code.fetch_docs(ExBook)
{_, _, _, _, module_doc, _, list_of_docs} = docs
module_doc
list_of_docs
System.put_env("LIVEBOOK_DEFAULT_RUNTIME", "attached:play:COOKIE")
System.get_env("LIVEBOOK_DEFAULT_RUNTIME")
"""
# ModuleName
```elixir
Mix.install([{:docs_to_livebook, path: "\#\{\_\_DIR\_\_\}"}])
```
## Module Doc
Documentation for livebook
## Functions
### hello/0
Hello world.
```elixir
ExBook.hello()
```
"""
docs =
{:docs_v1, 2, :elixir, "text/markdown", %{"en" => "Documentation for `ExBook`.\n"}, %{},
[
{{:function, :hello, 0}, 6, ["hello()"],
%{"en" => "Hello world.\n\n## Examples\n\n iex> ExBook.hello()\n :world\n\n"}, %{}},
{{:function, :hello_world, 0}, 19, ["hello_world()"],
%{
"en" => "Hello world.\n\n## Examples\n\n iex> ExBook.hello_world()\n :world\n\n"
}, %{}}
]}
string = """
Example Function
## Examples
iex> ExampleModule.hello()
:hello
"""
Regex.split(~r/iex\>[^\n]*/, string)
Example Function
Examples
ExampleModule.hello()
#ExBook_start
#Exbook_start
—ExBook—
— ExBook —
—- ExBook —-