Skip to content

Commit 6ec5b11

Browse files
committed
Also make HTML anchor unambiguous.
1 parent b8af61a commit 6ec5b11

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/antsibull_docs/data/docsite/ansible-docsite/macros/attributes.rst.j2

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
{% from 'macros/version_added.rst.j2' import version_added_rst %}
88

9-
{% macro in_rst(attributes, role_entrypoint=None) %}
9+
{% macro in_rst(attributes, attribute_html_prefix='', role_entrypoint=None) %}
1010
.. tabularcolumns:: \X{2}{10}\X{3}{10}\X{5}{10}
1111

1212
.. list-table::
@@ -24,7 +24,7 @@
2424
* - .. raw:: html
2525

2626
<div class="ansible-option-cell">
27-
<div class="ansibleOptionAnchor" id="attribute-@{ attribute | e }@"></div>
27+
<div class="ansibleOptionAnchor" id="attribute-@{ parameter_html_prefix }@@{ attribute | e }@"></div>
2828

2929
.. _@{ rst_attribute_ref(plugin_name, plugin_type, role_entrypoint=role_entrypoint, attribute=attribute) }@:
3030

@@ -34,7 +34,7 @@
3434

3535
.. raw:: html
3636

37-
<a class="ansibleOptionLink" href="#attribute-@{ attribute | e }@" title="Permalink to this attribute"></a>
37+
<a class="ansibleOptionLink" href="#attribute-@{ parameter_html_prefix }@@{ attribute | e }@" title="Permalink to this attribute"></a>
3838

3939
.. raw:: html
4040

src/antsibull_docs/data/docsite/ansible-docsite/role.rst.j2

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ Parameters
143143
Attributes
144144
----------
145145

146-
@{ attributes_rst(ep_doc['attributes'], role_entrypoint=entry_point) }@
146+
@{ attributes_rst(ep_doc['attributes'], attribute_html_prefix=entry_point ~ '--', role_entrypoint=entry_point) }@
147147
{% endif %}
148148

149149
.. Notes

0 commit comments

Comments
 (0)