Skip to content

Commit

Permalink
Sets refid correctly for target nodes (#233)
Browse files Browse the repository at this point in the history
Fixes #229
  • Loading branch information
danwos authored Apr 16, 2021
1 parent 99dac3d commit adc8018
Show file tree
Hide file tree
Showing 20 changed files with 4 additions and 3 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,5 @@ _build
.doctrees
docs/github_images/
.eggs/

docs/_images/need_pie_*.png
Binary file removed docs/_images/need_pie_10fbc.png
Binary file not shown.
Binary file removed docs/_images/need_pie_132a2.png
Binary file not shown.
Binary file removed docs/_images/need_pie_1bc0e.png
Binary file not shown.
Binary file removed docs/_images/need_pie_2c3ed.png
Binary file not shown.
Binary file removed docs/_images/need_pie_3d372.png
Binary file not shown.
Binary file removed docs/_images/need_pie_47238.png
Binary file not shown.
Binary file removed docs/_images/need_pie_64ad3.png
Binary file not shown.
Binary file removed docs/_images/need_pie_76ebe.png
Binary file not shown.
Binary file removed docs/_images/need_pie_873ef.png
Binary file not shown.
Binary file removed docs/_images/need_pie_88777.png
Binary file not shown.
Binary file removed docs/_images/need_pie_ca835.png
Binary file not shown.
Binary file removed docs/_images/need_pie_d0d45.png
Binary file not shown.
Binary file removed docs/_images/need_pie_d192f.png
Binary file not shown.
Binary file removed docs/_images/need_pie_dbfaf.png
Binary file not shown.
Binary file removed docs/_images/need_pie_df318.png
Binary file not shown.
Binary file removed docs/_images/need_pie_df9e6.png
Binary file not shown.
Binary file removed docs/_images/need_pie_e2e07.png
Binary file not shown.
Binary file removed docs/_images/need_pie_fd3f3.png
Binary file not shown.
5 changes: 2 additions & 3 deletions sphinxcontrib/needs/api/need.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ def run():
id=need_id, regex=env.app.config.needs_id_regex))

# Calculate target id, to be able to set a link back
target_node = nodes.target('', '', ids=[need_id])
target_node = nodes.target('', '', ids=[need_id], refid=need_id)

# Handle status
# Check if status is in needs_statuses. If not raise an error.
Expand Down Expand Up @@ -307,7 +307,7 @@ def run():
style_classes.append(style)

node_need = sphinxcontrib.needs.directives.need.Need(
'', classes=style_classes, ids=[need_id])
'', classes=style_classes, ids=[need_id], refid=need_id)

# Render rst-based content and add it to the need-node

Expand Down Expand Up @@ -377,7 +377,6 @@ def _read_in_links(links_string):
else:
links.append(link.strip())


# This may have cut also dynamic function strings, as they can contain , as well.
# So let put them together again
# ToDo: There may be a smart regex for the splitting. This would avoid this mess of code...
Expand Down

0 comments on commit adc8018

Please sign in to comment.