fix wrong recursion rule and allow / at link ends

This commit is contained in:
byte[] 2019-12-29 20:28:12 -05:00
parent 0310c733e7
commit 9b4cefa642
2 changed files with 2 additions and 2 deletions

View file

@ -27,7 +27,7 @@ defmodule FastTextile.Lexer do
|> unwrap_and_tag(:newline) |> unwrap_and_tag(:newline)
link_ending_characters = link_ending_characters =
utf8_char('#$%&(),./:;<=?\\`|\'') utf8_char('#$%&(),.:;<=?\\`|\'')
bracket_link_ending_characters = bracket_link_ending_characters =
utf8_char('" []') utf8_char('" []')

View file

@ -283,7 +283,7 @@ defmodule FastTextile.Parser do
defp inline_textile_element_not_opening_markup(parser, [{:bq_cite_start, start} | r_tokens]) do 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 case repeat(&bq_cite_text/2, parser, r_tokens) do
{:ok, tree, [{:bq_cite_open, _} | r2_tokens]} -> {:ok, tree, [{:bq_cite_open, _} | r2_tokens]} ->
case repeat(&inline_textile_element/2, parser, r2_tokens) do case repeat(&block_textile_element/2, parser, r2_tokens) do
{:ok, tree2, [{:bq_close, _} | r3_tokens]} -> {:ok, tree2, [{:bq_close, _} | r3_tokens]} ->
cite = escape(flatten(tree)) cite = escape(flatten(tree))