Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,7 @@
# Exclude copy button from appearing over notebook cell numbers by using :not()
# The default copybutton selector is `div.highlight pre`
# https://github.com/executablebooks/sphinx-copybutton/blob/master/sphinx_copybutton/__init__.py#L82
copybutton_exclude = ".linenos, .gp"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I also noticed on that page:

To skip all console outputs, add .go to the string above.

@stevepiercy did you intentionally not include that? Seems also useful (prompt outputs are usually not runnable code and would interfere with copy-paste-run)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@drammock I didn't include it because console output is not something that I would copy and paste into a terminal session. For example, in MyST source:

```console
A
billion
lines
of

...

stacktrace
```

However it might be useful in some other context of which I am not aware. Perhaps notebooks or some other utility? I selected only the options with which I am familiar. I can ammend my PR to what you think is best.

copybutton_selector = ":not(.prompt) > div.highlight pre"

# -- Options for HTML output -------------------------------------------------
Expand Down
Loading