mirror of
https://github.com/philomena-dev/philomena.git
synced 2024-11-27 13:47:58 +01:00
more complete tokenization of urls with internal parentheses
This commit is contained in:
parent
3ac8687c18
commit
6294c94704
1 changed files with 10 additions and 1 deletions
|
@ -91,10 +91,19 @@ defmodule Textile.Lexer do
|
|||
image_url_scheme
|
||||
])
|
||||
|
||||
defparsec(
|
||||
:unbracketed_url_inside,
|
||||
choice([
|
||||
string("(") |> parsec(:unbracketed_url_inside) |> string(")"),
|
||||
lookahead_not(end_of_link) |> utf8_char([])
|
||||
])
|
||||
|> repeat()
|
||||
)
|
||||
|
||||
unbracketed_url =
|
||||
string(":")
|
||||
|> concat(link_url_scheme)
|
||||
|> repeat(lookahead_not(end_of_link) |> utf8_char([]))
|
||||
|> parsec(:unbracketed_url_inside)
|
||||
|
||||
unbracketed_image_url =
|
||||
unbracketed_url
|
||||
|
|
Loading…
Reference in a new issue