Url links inside parenthetical statements are not interpreted as such
If you create a standard url link inside a parenthetical statement, the links may not be rendered as actual links.
For example the following doc block will fail to interpret the first link as a valid link:
docRepro = {{
Link link link blah ([myLink](www.google.com), [anotherLink](www.google.com))
}}
If the parenthetical is not immediately started with a link, you are able to successfully incorporate url links:
linkNotAtBeginning = {{
Text text blah (something something [myLink](www.google.com) blah blah blah)
}}
A transcript is attached with the doc code capable of producing the issue, but the issue is best seen in the local ui or unison share.
Here's another example of similar issue, where parser fails to understand braces ( ) in URLs.
Live example of Bytes.flatten.doc in base library:
https://share.unison-lang.org/@unison/base/code/releases/2.12.0/latest/terms/Bytes/flatten
Where rope link defined as:
[rope](https://en.wikipedia.org/wiki/Rope_(data_structure))
Parser need to be smarter about certain cases or URLs.
( and ) is totally valid characters in URL and doesn't need to be URL-encoded.
But i understand that it might be difficult to implement in the parser, which looks for closing ) while parsing links.
Meanwhile i fixed doc link via contribution, by using %28/%29 encoded braces.
https://share.unison-lang.org/@unison/base/contributions/15
Instead of dealing with markdown parser for links, maybe we can just extend Doc data-type:
unique type Doc
= ...
| Link Doc Doc
| ...
| ...
This way it might be easier to link images and other kind of documentation elements too.
Duplicate of #2483.