markright v0.4.3 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."}
iex> input = "
...> $ ls -la
...> ```
...> Other text.
...> "
iex> Markright.Parsers.Pre.to_ast(input)
%Markright.Continuation{
ast: {:pre, %{}, [{:code, %{}, "$ ls -la"}]}, tail: "\n Other text."}
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."}
Summary
Functions
Callback implementation for Markright.Parser.to_ast/2
Functions
Callback implementation for Markright.Parser.to_ast/2
.