Skip to content

Commit

Permalink
Break examples over multiple lines
Browse files Browse the repository at this point in the history
  • Loading branch information
camelpunch committed Nov 17, 2024
1 parent 627800b commit c0d93f6
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions lib/mudbrick.ex
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,13 @@ defmodule Mudbrick do
iex> import Mudbrick
...> new(fonts: %{bodoni: Mudbrick.TestHelper.bodoni_regular()})
...> |> page(size: {100, 50})
...> |> text([{"heading\\n", leading: 20}, "nounderline\\n", "now ", {"underline", underline: [width: 1]}, " that"], position: {8, 40}, font_size: 8)
...> |> text([
...> {"heading\\n", leading: 20},
...> "nounderline\\n",
...> "now ",
...> {"underline", underline: [width: 1]},
...> " that"
...> ], position: {8, 40}, font_size: 8)
...> |> render()
...> |> then(&File.write("examples/underlined_text.pdf", &1))
Expand All @@ -271,7 +277,13 @@ defmodule Mudbrick do
iex> import Mudbrick
...> new(fonts: %{bodoni: Mudbrick.TestHelper.bodoni_regular()})
...> |> page(size: {100, 50})
...> |> text([{"heading\\n", leading: 20}, "nounderline\\n", "now ", {"underline", underline: [width: 1]}, " that"], position: {90, 40}, font_size: 8, align: :right)
...> |> text([
...> {"heading\\n", leading: 20},
...> "nounderline\\n",
...> "now ",
...> {"underline", underline: [width: 1]},
...> " that"
...> ], position: {90, 40}, font_size: 8, align: :right)
...> |> render()
...> |> then(&File.write("examples/underlined_text_right_align.pdf", &1))
Expand Down

0 comments on commit c0d93f6

Please sign in to comment.