0

My project uses a substitution quite a bit (.. |apipath| replace:: http://domain/api/v1), and I'd like to be able to use this substitution inside an inline literal block. I want something like the following rST source:

Request URL: ``|apipath|/endpoint/method/param``

to turn into the following html output:

Request URL: <code>http://domain/api/v1/endpoint/method/param</code>

Instead, it outputs as

Request URL: <code>|apipath|/endpoint/method/param</code>

Any way you know of to get this to work?

I've tried playing with custom roles and classes. I know that the parsed-literal directive is available, but that appears to only create block content, not inline.

bad_coder
  • 11,289
  • 20
  • 44
  • 72
Spencer Williams
  • 902
  • 8
  • 26

1 Answers1

0

I don't know how if at all possible, but perhaps this at least visually comes close to it.

Request URL: |apipath|\ ``/endpoint/method/param``

.. |apipath| replace:: ``http://domain/api/v1``

or :literal:`http://domain/api/v1` in the replace contents.