[Doc-SIG] References in the same line as the target text

David Goodger goodger@users.sourceforge.net
Wed, 10 Jul 2002 22:09:50 -0400

Simon Budig wrote:
> The very first version I wrote indeed treated the second thing as an
> independant construct. It simply added an anonymous target when
> stumbling across __<uri>. However, It made the behaviour in the
> following case different than what I expected::
>    Here is a reference__ and here is a `second one`__ __<target1>
>    and here is a third__
>     __ target2
>     __ target3
> target1 got assigned to reference__, target2 to `second one`__
> and target3 to third__
> This was a different and a bit unexpected compared to my proposal.

Yes, this behavior would be broken.  As Ken mentioned, the inline
external target would have to match with the nearest prior reference.

> Hmm. Not sure. I think I would prefer to keep it the way it currently
> works. It reduces a source for confusion. However, I can change the
> code to the other behaviour if wanted

I don't prefer *either* way, as you know ;-).  I'm just exploring
ramifications.  As soon as a new construct is added, somebody will try
to apply it in an orthogonal way.  If we're going to require that the
target immediately follow the reference, we might as well embed the
target in the reference and use syntax like "`reference text
<http://example.com/>`__".  See my post "Summary of reference/target

> (I am not sure how much work I should invest in this, since the
> reactions to your call for opinions were pretty clear up to now, so
> this patch is likely to end as an local extension...).

You've already done most of it.  I have to add support for
parser-changing pragma directives, and then I suppose I will implement
one as a test case.  It may not be this one though; *that* may depend
on your investment!

David Goodger  <goodger@users.sourceforge.net>  Open-source projects:
  - Python Docutils: http://docutils.sourceforge.net/
    (includes reStructuredText: http://docutils.sf.net/rst.html)
  - The Go Tools Project: http://gotools.sourceforge.net/