Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug fix: Generate several latex documents #1208

Open
wants to merge 9 commits into
base: master
Choose a base branch
from
Prev Previous commit
Next Next commit
Update need_incoming.py
fournier-p authored Jul 23, 2024

Unverified

This commit is not signed, but one or more authors requires that any commit attributed to them is signed.
commit 93c905d32161d83f3d79794e9a0fcc922ca800c4
16 changes: 9 additions & 7 deletions sphinx_needs/roles/need_incoming.py
Original file line number Diff line number Diff line change
@@ -40,8 +40,8 @@ def process_need_incoming(
for index, back_link in enumerate(links_back):
# If need back_link target exists, let's create the reference
if back_link in all_needs:
target_need = all_needs[back_link]
try:
target_need = all_needs[back_link]
if needs_config.show_link_title:
link_text = f'{target_need["title"]}'

@@ -82,13 +82,15 @@ def process_need_incoming(

node_link_container += new_node_ref

# If we have several links, we add an empty text between them
if index + 1 < len(links_back):
node_link_container += nodes.Text(", ")

except NoUri:
# If the given need id can not be found, we must pass here....
pass
# If the given need id can not be found,
# we make an emphasis to still show the need id
# This allows to show traceability in cross documents cases.
node_link_container += nodes.emphasis(target_need["id"],target_need["id"])

# If we have several links, we add an empty text between them
if index + 1 < len(links_back):
node_link_container += nodes.Text(", ")

else:
logger.warning(