php-markdown
php-markdown copied to clipboard
Links with nested code don't work
It seems that links with nested code don't work:
Some text describing what [`SomeClass`] does...
[`SomeClass`]: http://..../api/SomeClass.html
This is transformed to the HTML:
[<code>SomeClass</code>]
I would expect the <code>
to be wrapped inside an <a>
.
For reference, GitHub's parser recognizes such links:
Some text describing what SomeClass
does...
Acknowledged. That's a bug in need of fixing. It might take a while to fix this though, as I think it'll require an overhaul of the span-level parser so that links are processed in the same pass as code spans.
Note that you can work around this by specifying explicitly a reference name, like this:
Some text describing what [`SomeClass`][SomeClass] does...
[SomeClass]: http://..../api/SomeClass.html
Just be sure not to include any ``` in the explicit reference name, or you'll encounter the same problem again.
Awesome, thanks for the workaround! :)
For reference, I just tried the workaround but it doesn't work for me. :(
Confirmed, it works with 1.5.0.