Skip to content

some domain directives generate wrong target ID #6903

@tk0miya

Description

@tk0miya

Describe the bug
Some domain directives generate wrong target ID. For example, both py:module and js:module generate target IDs with wrong operation. So they might be conflicted.

To Reproduce

This input are converted to following:

blah blah blah

.. js:module:: foo

blah blah blah

.. py:module:: foo

blah blah blah
<p>blah blah blah</p>
<span class="target" id="module-foo"></span><p>blah blah blah</p>
<span class="target" id="module-foo"></span><p>blah blah blah</p>

Expected behavior
All domain directives generate valid target IDs and they are not conflicted.

Your project
N/A

Screenshots
N/A

Environment info

  • OS: Mac
  • Python version: 3.8.0
  • Sphinx version: 2.2.2
  • Sphinx extensions: N/A

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions