[parsing] Improve url detection (ISH-302)
All checks were successful
/ unit-tests (push) Successful in 25s
/ build-and-push (push) Successful in 1m46s

This commit is contained in:
Laura Hausmann 2024-05-02 22:21:41 +02:00
parent 69065ef1d7
commit c3a4e235a7
Signed by: zotan
GPG key ID: D044E84C5BE01605

View file

@ -248,7 +248,7 @@ module private MfmParser =
let urlNodePlain =
lookAhead (skipString "https://" <|> skipString "http://")
>>. manyCharsTill anyChar (nextCharSatisfies isWhitespace <|> eof) //FIXME: this needs significant improvements
>>. manyCharsTill anyChar (nextCharSatisfies isWhitespace <|> skipAnyOf "()" <|> eof) //FIXME: this needs significant improvements
>>= fun uri ->
match Uri.TryCreate(uri, UriKind.Absolute) with
| true, finalUri ->