Skip to content

Commit a908c14

Browse files
Add the "See Also" section to the TryExamples directive's trailing section ignore patterns (#251)
* Add `..seealso` section as a pattern * Fix escaping of regex characters Co-Authored-By: Albert Steppi <[email protected]> * Reword comment about SymPy's special case Co-Authored-By: Albert Steppi <[email protected]> * Add subset of docutils + Sphinx directives to end at * Revert "Add subset of docutils + Sphinx directives to end at" This reverts commit 79e864e. * Reword comment about "See Also" section Co-Authored-By: Albert Steppi <[email protected]> * Remove references to historical PRs Co-authored-by: Albert Steppi <[email protected]> --------- Co-authored-by: Albert Steppi <[email protected]>
1 parent 0a0d5a0 commit a908c14

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

jupyterlite_sphinx/_try_examples.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -308,13 +308,16 @@ def _process_literal_blocks(md_text):
308308
_next_section_pattern = re.compile(
309309
"|".join(
310310
[
311-
rf".. (rubric|admonition)::\s*{header}"
311+
rf"\.\. (rubric|admonition)::\s*{header}"
312312
for header in _non_example_docstring_section_headers
313313
]
314314
# If examples section is last, processed by numpydoc may appear at end.
315315
+ [r"\!\! processed by numpydoc \!\!"]
316316
# Attributes section sometimes has no directive.
317317
+ [r":Attributes:"]
318+
# See Also sections are mapped to Sphinx's `.. seealso::` directive,
319+
# not admonitions or rubrics.
320+
+ [r"\.\. seealso::"]
318321
)
319322
)
320323

0 commit comments

Comments
 (0)