Skip to content

Commit

Permalink
Add the "See Also" section to the TryExamples directive's trailing …
Browse files Browse the repository at this point in the history
…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]>
  • Loading branch information
agriyakhetarpal and steppi authored Jan 13, 2025
1 parent 0a0d5a0 commit a908c14
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion jupyterlite_sphinx/_try_examples.py
Original file line number Diff line number Diff line change
Expand Up @@ -308,13 +308,16 @@ def _process_literal_blocks(md_text):
_next_section_pattern = re.compile(
"|".join(
[
rf".. (rubric|admonition)::\s*{header}"
rf"\.\. (rubric|admonition)::\s*{header}"
for header in _non_example_docstring_section_headers
]
# If examples section is last, processed by numpydoc may appear at end.
+ [r"\!\! processed by numpydoc \!\!"]
# Attributes section sometimes has no directive.
+ [r":Attributes:"]
# See Also sections are mapped to Sphinx's `.. seealso::` directive,
# not admonitions or rubrics.
+ [r"\.\. seealso::"]
)
)

Expand Down

0 comments on commit a908c14

Please sign in to comment.