```
% pandoc -f rst
`hello`_ and `goodbye`_

.. _hello:
.. _goodbye: example.com
^D
<p><a href="example.com">hello</a> and <a
href="example.com">goodbye</a></p>
```

```
% pandoc -f rst
`hello`_ `goodbye`_

.. _hello:
.. _goodbye:

paragraph
^D
<p><a href="#hello">hello</a> <a href="#goodbye">goodbye</a></p>
<div id="hello">
<div id="goodbye">
<p>paragraph</p>
</div>
</div>
```
