Inline, verbatim anchors?

Matthew Woehlke <[email protected]> Mon, 7 Oct 2019 11:20:56 -0400
Newsgroups gmane.text.docutils.user
Message-ID <[email protected]>
I have a document that is structured roughly like the C++ standard, e.g.:


  Some Heading [foo]
  ------------------

  [foo.dog] This is a paragraph with some text.

  [foo.cat] This is another paragraph.

I want to be able to link to specific paragraphs, i.e.
https://example.com/docs/foo.html#foo.bar.

Is there any way to accomplish this? Would a patch to add a feature like
this be accepted?

What I want, ideally, is a role that takes its text and generates an
anchor from its text (i.e. sets the 'id' on its node to its contents),
*and also emits the text*. I don't want to repeat__ the section
identifiers, i.e. not this:

  .. _foo.dog

  [foo.dog] Text goes here

I also want to be able to use this "anywhere", not just before
paragraphs. (In particular, much of my document is structured as lists...)

__ https://en.wikipedia.org/wiki/Don%27t_repeat_yourself

-- 
Matthew