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
Auto-enumerated lists (#.) are not working when including content based on tags (.. only:: TAG).
Let's have a look at the following example document:
#. 1st entry
#. 2nd entry
.. only:: foo
#. 3rd entry for tag ``foo``
#. 3rd entry, 4th entry for tag ``foo``
.. only:: foo or bar
#. 5th entry for tag ``foo``, 4th entry for tag ``bar``
#. 4th entry, 6th entry for tag ``foo``, 5th entry for ``bar``
#. 5th entry, 7th entry for tag ``foo``, 6th entry for ``bar``
Result for sphinx-build -t foo ...:
1. 1st entry
2. 2nd entry
1. 3rd entry for tag foo
1. 3rd entry, 4th entry for tag foo
1. 5th entry for tag foo, 4th entry for tag bar
1. 4th entry, 6th entry for tag foo, 5th entry for bar
2. 5th entry, 7th entry for tag foo, 6th entry for bar
Expected result for sphinx-build -t foo ...:
1. 1st entry
2. 2nd entry
3. 3rd entry for tag foo
4. 3rd entry, 4th entry for tag foo
5. 5th entry for tag foo, 4th entry for tag bar
6. 4th entry, 6th entry for tag foo, 5th entry for bar
7. 5th entry, 7th entry for tag foo, 6th entry for bar
Result for sphinx-build -t bar ...:
1. 1st entry
2. 2nd entry
1. 3rd entry, 4th entry for tag foo
1. 5th entry for tag foo, 4th entry for tag bar
1. 4th entry, 6th entry for tag foo, 5th entry for bar
2. 5th entry, 7th entry for tag foo, 6th entry for bar
Expected result for sphinx-build -t bar ...:
1. 1st entry
2. 2nd entry
3. 3rd entry, 4th entry for tag foo
4. 5th entry for tag foo, 4th entry for tag bar
5. 4th entry, 6th entry for tag foo, 5th entry for bar
6. 5th entry, 7th entry for tag foo, 6th entry for bar
Result for sphinx-build ...:
1. 1st entry
2. 2nd entry
1. 3rd entry, 4th entry for tag foo
1. 4th entry, 6th entry for tag foo, 5th entry for bar
2. 5th entry, 7th entry for tag foo, 6th entry for bar
Expected result for sphinx-build ...:
1. 1st entry
2. 2nd entry
3. 3rd entry, 4th entry for tag foo
4. 4th entry, 6th entry for tag foo, 5th entry for bar
5. 5th entry, 7th entry for tag foo, 6th entry for bar
The text was updated successfully, but these errors were encountered:
In fact, .. only:: directive doesn't match for such situation. Directives always create new paragraph block, it means that directives terminate the continuous processing of the immediately preceding.
It's a specification of docutils, so then there is no way to get the results as your expectations from sphinx side.
Auto-enumerated lists (
#.
) are not working when including content based on tags (.. only:: TAG
).Let's have a look at the following example document:
Result for
sphinx-build -t foo ...
:Expected result for
sphinx-build -t foo ...
:Result for
sphinx-build -t bar ...
:Expected result for
sphinx-build -t bar ...
:Result for
sphinx-build ...
:Expected result for
sphinx-build ...
:The text was updated successfully, but these errors were encountered: