On Friday, September 27 2013, 08:20:06, Dave Cottlehuber wrote:

> Hi,
>
> I've got a bunch of code-blocks like so:
>
> <snip>
>
> and I would like to use |version| and other global substitutions within
> here, which obviously doesn't work directly.
>
> Is there any way around this behaviour, such as some escaping?

I'm unaware of a work around in Sphinx. For this exact case, I generate
an RST file in python and use rst's include statement for that
file. It's been incredibly robust for me. I use this little "write rst
in python" library that I wrote here for this:
https://pypi.python.org/pypi/rstcloth/

The other option would be to inject a pre-processing stage to handle
replacements and other mutations before running Sphinx. To make this
work, you should tell ``sphinx-build`` that the source directory is at
``build/sphinx/`` and then rsync the "real" source directory there
before building (and running the pre-processing.)

Cheers,
sam

--
Sam Kleinman (tychoish):
 - [email protected]
 - tychoish <http://tychoish.com/>
 "don't get it right, get it written" -- james thurber

-- 
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 [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sphinx-users.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to