mirror of
https://github.com/philomena-dev/philomena.git
synced 2024-11-27 13:47:58 +01:00
change failure rules
This commit is contained in:
parent
9b4cefa642
commit
fa2024764c
1 changed files with 6 additions and 3 deletions
|
@ -282,7 +282,7 @@ defmodule FastTextile.Parser do
|
|||
end
|
||||
defp inline_textile_element_not_opening_markup(parser, [{:bq_cite_start, start} | r_tokens]) do
|
||||
case repeat(&bq_cite_text/2, parser, r_tokens) do
|
||||
{:ok, tree, [{:bq_cite_open, _} | r2_tokens]} ->
|
||||
{:ok, tree, [{:bq_cite_open, open} | r2_tokens]} ->
|
||||
case repeat(&block_textile_element/2, parser, r2_tokens) do
|
||||
{:ok, tree2, [{:bq_close, _} | r3_tokens]} ->
|
||||
cite = escape(flatten(tree))
|
||||
|
@ -290,16 +290,19 @@ defmodule FastTextile.Parser do
|
|||
{:ok, [{:markup, "<blockquote author=\""}, {:markup, cite}, {:markup, "\">"}, tree2, {:markup, "</blockquote>"}], r3_tokens}
|
||||
|
||||
{:ok, tree2, r3_tokens} ->
|
||||
{:ok, [{:text, escape(start)}, {:text, escape(flatten(tree))}, tree2], r3_tokens}
|
||||
{:ok, [{:text, escape(start)}, {:text, escape(flatten(tree))}, {:text, escape(open)}, tree2], r3_tokens}
|
||||
|
||||
_ ->
|
||||
{:ok, [{:text, escape(start)}], r_tokens}
|
||||
{:ok, [{:text, escape(start)}, {:text, escape(flatten(tree))}, {:text, escape(open)}], r_tokens}
|
||||
end
|
||||
|
||||
_ ->
|
||||
{:ok, [{:text, escape(start)}], r_tokens}
|
||||
end
|
||||
end
|
||||
defp inline_textile_element_not_opening_markup(_parser, [{:bq_cite_open, tok} | r_tokens]) do
|
||||
{:ok, [{:text, escape(tok)}], r_tokens}
|
||||
end
|
||||
defp inline_textile_element_not_opening_markup(parser, tokens) do
|
||||
[
|
||||
{:bq_open, :bq_close, "<blockquote>", "</blockquote>"},
|
||||
|
|
Loading…
Reference in a new issue