There are two other approaches that may work for you that I have used or 
seen people use:
1) Pass it through a pre-processer first to do replacements like that
2) Look into the jinja extension.  

In both cases the variables will be be replaced before docutils sees the 
reST.

On Friday, April 14, 2017 at 7:54:56 PM UTC-7, Mark Peters wrote:
>
> Hi,
>
> Is it possible to parse an inline literal to replace text using 
> substitution? 
>
> For example, our RST doc includes values that are updated periodically 
> such as:
>
> The policy must be stored in the ``/etc/debsig/policies/|GPG_KEY_ID|`` 
> directory
>
> .. |GPG_KEY_ID| replace:: 69BE019A
>
> The substitution text is interpreted, well, literally:
>
>
> I've tried using backslash-escaped whitespace, as follows, but the second 
> backslash escapes both the text and the second set of double-ticks:
>
> The policy must be stored in the ``/etc/debsig/policies/\ |GPG_KEY_ID|\ `` 
> directory
>
>
> I know to use the parsed-literal directive for code blocks. Is there an 
> option for inline literals? 
>
> Thanks,
> Mark
>
>
>
>
>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"sphinx-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sphinx-users+unsubscr...@googlegroups.com.
To post to this group, send email to sphinx-users@googlegroups.com.
Visit this group at https://groups.google.com/group/sphinx-users.
For more options, visit https://groups.google.com/d/optout.

Reply via email to