symfony-tools/docs-builder

Hyperlink references involving braces are not rendered properly

Opened this issue · 3 comments

stof commented

https://symfony.com/doc/current/reference/configuration/twig.html#autoescape-service-method is not rendered properly right now.

source code:

If the service defined in ``autoescape_service`` is invocable (i.e. it defines
the `__invoke() PHP magic method`_) you can omit this option.
.. _`__invoke() PHP magic method`: https://www.php.net/manual/en/language.oop5.magic.php#object.invoke

Rendered output:
Image

- is rendered properly right now.
+ is NOT rendered properly right now. 

?

stof commented

@OskarStark indeed. I fixed it (the issue title was correct)

I dig a bit and this behavior come from doctrine/rst-parser

https://github.com/doctrine/rst-parser/blob/0.5.x/lib/Span/SpanProcessor.php#L171-L174

// a link starting with _ is not a link - return original string
if (substr($link, 0, 1) === '_') {
    return $match[0];
}

(Introduced in doctrine/rst-parser#79 (comment))