markright v0.1.0 Markright.Parsers.Pre
Parses the input for the code block.
Examples
iex> input = "ruby
...> $ ls -la
...> ```
...> Other text.
...> "
iex> Markright.Parsers.Pre.to_ast(input)
%Markright.Continuation{
ast: {:pre, %{}, [{:code, %{lang: "ruby"}, " $ ls -la"}]},
tail: "\n Other text.\n "}
iex> input = "
...> $ ls -la
...> ```
...> Other text.
...> "
iex> Markright.Parsers.Pre.to_ast(input)
%Markright.Continuation{
ast: {:pre, %{}, [{:code, %{}, " $ ls -la"}]}, tail: "\n Other text.\n "}
iex> input = "elixir
...> def f(\"\"), do: :empty_string
...>
...> def f([]), do: :empty_list
...> ```
...> Other text.
...> "
iex> Markright.Parsers.Pre.to_ast(input)
%Markright.Continuation{ast: {:pre, %{},
[{:code, %{lang: "elixir"},
" def f(\"\"), do: :empty_string\n\n def f([]), do: :empty_list"}]},
tail: "\n Other text.\n "}
Summary
Functions
Callback implementation for Markright.Parser.to_ast/3
Functions
Callback implementation for Markright.Parser.to_ast/3
.