From: Adam T. <aa-...@us...> - 2022-04-29 03:17:40
|
It is technically correct output, although I agree surprising. There are two targets in this document, `different name` and `a link`. `different name` is referenced by the alias reference syntax in line 1, but `a link` is never referenced. The following document generates no errors: ```restructuredtext `a link <different name_>`_ reference to `a link`_ .. _different name: https://www.example.com ``` Alternatively, you could use an anonymous reference: ```restructuredtext `a link <different name_>`__ .. _different name: https://www.example.com ``` Perhaps we could improve the error message? A --- ** [bugs:#446] Links with bracket references cause unexpected "Hyperlink target is not referenced" error** **Status:** open **Created:** Thu Apr 21, 2022 07:13 PM UTC by Jesse Brennan **Last Updated:** Thu Apr 21, 2022 07:13 PM UTC **Owner:** nobody I'm getting a surprising error when running reporting on a minimal RST file. Here's the minimal.rst: ~~~ `a link <different name_>`_ .. _different name: https//www.example.com ~~~ Now if I run ~~~ rst2html.py minimal.rst --report=1 --traceback > /dev/null minimal.rst:3: (INFO/1) Hyperlink target "a link" is not referenced. ~~~ you see the error I get. As far as I know, this is perfectly valid RST, so I'm wondering if this error message is a bug. For more context, I encountered this error originally on a different project: https://github.com/myint/rstcheck/issues/77 which makes use of docutils. --- Sent from sourceforge.net because doc...@li... is subscribed to https://sourceforge.net/p/docutils/bugs/ To unsubscribe from further messages, a project admin can change settings at https://sourceforge.net/p/docutils/admin/bugs/options. Or, if this is a mailing list, you can unsubscribe from the mailing list. |