You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I add the prf:example directive in two different files (foo.rst and bar.rst), the first
example for each file is labeled 'example-0'.
This leads to
foo.rst: WARNING: duplicate example label 'example-0', other instance in bar.rst
when I run "make html". The examples have correct labels in the HTML output, so the main problem is the large number of warnings during compile time (with hundreds of examples, it becomes difficult to see other warnings).
The duplication seems to be caused by the use of serial_no = env.new_serialno() in directive.py. According to the Sphinx documentation for new_serialno:
The number is guaranteed to be unique in the current document.
Is it possible to get a unique number per example in a project?
Reproduce the bug
Create a file with prf:example directive.
Create another file with prf:example directive.
Add both files to a toctree.
Note warning during sphinx-build.
List your environment
Sphinx 4.5
sphinx_proof extension (no other extensions)
The text was updated successfully, but these errors were encountered:
Thanks for opening your first issue here! Engagement like this is essential for open source projects! 🤗
If you haven't done so already, check out EBP's Code of Conduct. Also, please try to follow the issue template as it helps other community members to contribute more effectively.
If your issue is a feature request, others may react to it, to raise its prominence (see Feature Voting).
Describe the bug
When I add the prf:example directive in two different files (foo.rst and bar.rst), the first
example for each file is labeled 'example-0'.
This leads to
foo.rst: WARNING: duplicate example label 'example-0', other instance in bar.rst
when I run "make html". The examples have correct labels in the HTML output, so the main problem is the large number of warnings during compile time (with hundreds of examples, it becomes difficult to see other warnings).
The duplication seems to be caused by the use of serial_no = env.new_serialno() in directive.py. According to the Sphinx documentation for new_serialno:
The number is guaranteed to be unique in the current document.
Is it possible to get a unique number per example in a project?
Reproduce the bug
List your environment
Sphinx 4.5
sphinx_proof extension (no other extensions)
The text was updated successfully, but these errors were encountered: