George V. Reilly

reStructuredText Nested Markup

I use re­Struc­tured­Text for both this blog and the MetaBrite DevBlog. This blog is built with Acrylamid, while the MetaBrite blog is built with Nikola.

Yesterday I used a link (~/.pgpass) that styled the link as an inline literal; i.e., in the code font. Re­Struc­tured­Text doesn’t support nested markup, but you can pull it together with a two-step sub­sti­tu­tion reference:

Here you have |optparse.OptionParser|_.

.. |optparse.OptionParser| replace:: ``optparse.OptionParser`` documentation
.. _optparse.OptionParser: http://docs.python.org/library/optparse.html

This is tedious as you have to create a pair of directives for every such link that you wish to style.

Nested inline markup has been on the todo list for 15 years—it ain’t happening.

Creating a New PostgreSQL Database at RDS » « reStructuredText Anonymous Hyperlinks