Files
sphinx/sphinx
Merry Bass fb39974486 sphinx.ext.extlinks: Allow `%s` in link caption string
Tweak syntax of extlinks to also allow ``%s`` in the link caption part.
Like for the base URL ``%s`` will be substituted with the content of the
role.  This allows configurations like

    extlinks = {'quarter': ('https://example.org/quaters/%s',
                          '%s. quarter')}

with ``:quarter:`2``` getting replaced by a link titled `2. quarter`.

The requirement for the caption string is to be either None or contain
exactly one ``%s``.  If neither is the case, then we emit a warning and
fall back to the old behaviour which is concatenating the caption string
with the role content.
2021-04-11 22:14:01 +09:00
..
2021-04-11 20:30:40 +09:00
2021-04-11 02:22:32 +09:00
2021-04-11 20:28:18 +09:00
2021-01-01 13:40:48 +09:00
2021-01-01 13:57:19 +09:00
2021-01-01 13:57:19 +09:00
2021-01-01 13:40:48 +09:00
2021-01-01 13:57:19 +09:00