Open svetlyak40wt opened 3 years ago
Probably, it will be good idea along with a fix add a check which will fail if link argument is not starting from http
or /
, because such fix will make wrong result appear in all places where this markdown feature is used and it might be better to break everything, than to have many broken links on the whole site.
I am aware of this behavior, but I had not (previously) considered it a bug, simply a consequence of the unfortunate fact that Markdown and HTML take links and descriptions in the opposite order.
I will think however about whether there is some way to make the behavior less surprising without having to introduce a full HTML parser.
The problem with checking the link argument for /
is that it would prevent relative links.
A short demo
Set up the environment:
When I'm trying an example from the README, everything works like expected:
But when I provide both, text and URL, the result is broken:
The expected result is:
With manual calls to
format
andcl-markdown:markdown
I'm getting the desired result: