-
Notifications
You must be signed in to change notification settings - Fork 83
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
docs: Use sphinx-copybutton prompt regex to fully capture examples #1617
Conversation
Relevant RTD build: https://pyhf--1617.org.readthedocs.build/en/1617/index.html#hello-world |
Codecov Report
@@ Coverage Diff @@
## master #1617 +/- ##
=======================================
Coverage 97.70% 97.70%
=======================================
Files 63 63
Lines 4048 4048
Branches 576 576
=======================================
Hits 3955 3955
Misses 54 54
Partials 39 39
Flags with carried forward coverage won't be shown. Click here to find out more. Continue to review full report at Codecov.
|
Probably won't need prompts of format: * [12345]: * ...:
https://sphinx-copybutton.readthedocs.io/en/latest/#strip-and-configure-input-prompts-for-code-cells actually covered and fixed all my issues. The HERE-document syntax option is super nice! |
Description
Apply results of executablebooks/sphinx-copybutton#82 (released in
sphinx-copybutton
v0.3.0
) to use thecopybutton_prompt_text
regex support to accept both>>>
and...
as valid prompt text (along with the others shown in executablebooks/sphinx-copybutton#82 to safeguard against future prompts) to allow for the "hello world" example from the READMEpyhf/README.rst
Lines 42 to 52 in 6db5223
to be copied correctly.
This is covered in more depth in the sphinx-copybutton docs on how to Strip and configure input prompts for code cells.
Checklist Before Requesting Reviewer
Before Merging
For the PR Assignees: