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
Copy file name to clipboardExpand all lines: src/sage/misc/sagedoc.py
+23-11Lines changed: 23 additions & 11 deletions
Original file line number
Diff line number
Diff line change
@@ -590,21 +590,33 @@ def process_mathtt(s):
590
590
returns
591
591
592
592
593
-
defprocess_optional_annotations(s):
593
+
defprocess_optional_doctest_tags(s):
594
594
r"""
595
-
Remove ``# optional`` annotations for present features from docstring ``s``.
596
-
"""
597
-
lines=s.split('\n')
595
+
Remove ``# optional/needs`` doctest tags for present features from docstring ``s``.
596
+
597
+
EXAMPLES:
598
598
599
+
sage: from sage.misc.sagedoc import process_optional_doctest_tags
600
+
sage: process_optional_doctest_tags("sage: # needs sage.rings.finite_rings\nsage: K.<x> = FunctionField(GF(5^2,'a')); K\nRational function field in x over Finite Field in a of size 5^2") # needs sage.rings.finite_rings
601
+
"sage: K.<x> = FunctionField(GF(5^2,'a')); K\nRational function field in x over Finite Field in a of size 5^2"
0 commit comments