Hi all,

I'm trying something that I'm not sure is really possible, but I am
open to writing a custom directive if it would be possible that way:

Firstly I should say that this is not being used in a python project,
but a totally unsupported language domain, I am just using sphinx and
rst for its ease of use, configuration and power.

I am putting lots of repeated rst in files that I am "including" in
the actual source rst for a given file that I am documenting. As these
files that need to be documented there is a lot of duplicated class
attributes that have different prefixes - an example is probably
clearer!

[generic.rst]
  .. attribute: |prefix|_my_attr
     this is the |prefix|_my_attr dox

[file1.rst]

.. |prefix| replace:: foo

.. include:: generic.rst

.. |prefix| replace:: bar

.. include:: generic.rst

I'm hoping this would result in nice formatted replaced text in the
result of file1 something like:

  .. attribute: foo_my_attr
     this is the foo_my_attr dox

  .. attribute: bar_my_attr
     this is the bar_my_attr dox

But instead I get multi replace definition errors...

Does this make anysense to anyone? Is it currently possible? How would
I go about writing a custom directive to achieve it?

Many thanks,

Alex.

-- 
You received this message because you are subscribed to the Google Groups 
"sphinx-dev" group.
To post to this group, send email to sphinx-dev@googlegroups.com.
To unsubscribe from this group, send email to 
sphinx-dev+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/sphinx-dev?hl=en.

Reply via email to