Skip to content

Explicit hyperlink target should silence "duplicate implicit target name" message #76

Closed

Description

@inventhouse

If there are sections with the same title, a Duplicate implicit target name message is generated; however the documentation for explicit targets, while not addressing this specific case, describe adding explicit hyperlink targets by placing them just before the block to be targeted. This seems (to me) to imply that this StackOverflow answer should work to silence this warning, but it does not.

Activity

  1. phlax commented on Apr 19, 2021

    @phlax

    +1 im guessing the workarounds are either to raise level to warn (as suggested in SO discussion - pretty undesirable tbh) or to filter out these messages

    it would be great if this was fixed

  2. Cielquan commented on Apr 16, 2022

    @Cielquan
    Collaborator

    I can reproduce this issue.

    Are you willing to tackle it?

  3. Cielquan commented on Apr 19, 2022

    @Cielquan
    Collaborator

    I looked into the matter and this is an issue with docutils and not rstcheck. rstcheck simply passes the info message on.

    If you open an issue over at https://sourceforge.net/p/docutils/_list/tickets please link it here, so we can follow the progress.

  4. added
    upstream issue
    and removed on Apr 19, 2022
  5. pshiu commented on Jun 16, 2022

    @pshiu

    Per https://docutils.sourceforge.io/docs/ref/rst/restructuredtext.html#implicit-hyperlink-targets, the generation of this INFO-level message may be expected behavior:

    Explicit hyperlink targets override any implicit targets having the same reference name. The implicit hyperlink targets are removed, and level-1 (info) system messages are inserted.

  6. Cielquan commented on Jun 28, 2022

    @Cielquan
    Collaborator

    Per https://docutils.sourceforge.io/docs/ref/rst/restructuredtext.html#implicit-hyperlink-targets, the generation of this INFO-level message may be expected behavior:

    Explicit hyperlink targets override any implicit targets having the same reference name. The implicit hyperlink targets are removed, and level-1 (info) system messages are inserted.

    This indeed seems be the case.

    The SO answer uses the explicit target _description2 to overwrite the duplicate implicit target description for the reference name Description. So what happens is exactly what is described in the quote.

    So the only possible solutions to this issue are:

    • raising the report level to warning
    • ignoring the info message via the --ignore-messages CLI option or ignore_messages file config option
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugupstream issue

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions