mirror of
https://github.com/philomena-dev/philomena.git
synced 2024-11-24 04:27:59 +01:00
allow blockquote cite context to consume all markup
This commit is contained in:
parent
17733fe9f2
commit
efb28184a3
1 changed files with 8 additions and 5 deletions
|
@ -227,22 +227,25 @@ defmodule Textile.Parser do
|
||||||
end
|
end
|
||||||
|
|
||||||
#
|
#
|
||||||
# bq_cite_text = literal | char | space | quicktxt;
|
# bq_cite_text = (?!bq_cite_open);
|
||||||
#
|
#
|
||||||
|
|
||||||
# Note that text is not escaped here because it will be escaped
|
# Note that text is not escaped here because it will be escaped
|
||||||
# when the tree is flattened
|
# when the tree is flattened
|
||||||
defp bq_cite_text(_parser, [{:literal, lit} | r_tokens]) do
|
defp bq_cite_text(_parser, [{:bq_cite_open, _open} | _rest]) do
|
||||||
{:ok, [{:text, lit}], r_tokens}
|
{:error, "Expected cite tokens"}
|
||||||
end
|
end
|
||||||
defp bq_cite_text(_parser, [{:char, lit} | r_tokens]) do
|
defp bq_cite_text(_parser, [{:char, lit} | r_tokens]) do
|
||||||
{:ok, [{:text, <<lit::utf8>>}], r_tokens}
|
{:ok, [{:text, <<lit::utf8>>}], r_tokens}
|
||||||
end
|
end
|
||||||
|
defp bq_cite_text(_parser, [{:quicktxt, lit} | r_tokens]) do
|
||||||
|
{:ok, [{:text, <<lit::utf8>>}], r_tokens}
|
||||||
|
end
|
||||||
defp bq_cite_text(_parser, [{:space, _} | r_tokens]) do
|
defp bq_cite_text(_parser, [{:space, _} | r_tokens]) do
|
||||||
{:ok, [{:text, " "}], r_tokens}
|
{:ok, [{:text, " "}], r_tokens}
|
||||||
end
|
end
|
||||||
defp bq_cite_text(_parser, [{:quicktxt, lit} | r_tokens]) do
|
defp bq_cite_text(_parser, [{_token, t} | r_tokens]) do
|
||||||
{:ok, [{:text, <<lit::utf8>>}], r_tokens}
|
{:ok, [{:text, t}], r_tokens}
|
||||||
end
|
end
|
||||||
defp bq_cite_text(_parser, _tokens) do
|
defp bq_cite_text(_parser, _tokens) do
|
||||||
{:error, "Expected cite tokens"}
|
{:error, "Expected cite tokens"}
|
||||||
|
|
Loading…
Reference in a new issue