Skip to content

Commit 002e616

Browse files
committed
🐛 Fix trailing separator in string_links for single-value fields
The separator condition used len(data) which refers to the original string length instead of len(data_list) which is the split list. This caused a trailing "; " to always appear after single-value fields when needs_string_links is configured.
1 parent 3ba0da0 commit 002e616

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

sphinx_needs/layout.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -546,7 +546,7 @@ def meta(
546546
data_node += ref_item
547547

548548
if (
549-
name in needs_string_links_option and index + 1 < len(data)
549+
name in needs_string_links_option and index + 1 < len(data_list)
550550
) or index + 1 < len([data]):
551551
data_node += nodes.emphasis("; ", "; ")
552552

0 commit comments

Comments
 (0)