Skip to content

Commit

Permalink
copybutton_exclude: Add .gp to default exclusion
Browse files Browse the repository at this point in the history
- `.linenos` is the line numbers, and `.gp` is the tag from the
  pygments highlighter for things like the `$` prompt.  Upstream
  sphinx CSS excludes `.gp` from being copied, see the analysis here:

  executablebooks#138 (comment)

- If upstream sphinx excludes `.gp`, we probably should as well.
  • Loading branch information
rkdarst committed Sep 13, 2022
1 parent 417be14 commit 6094cf3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sphinx_copybutton/__init__.py
Expand Up @@ -81,7 +81,7 @@ def setup(app):
app.add_config_value("copybutton_here_doc_delimiter", "", "html")
app.add_config_value("copybutton_image_svg", "", "html")
app.add_config_value("copybutton_selector", "div.highlight pre", "html")
app.add_config_value("copybutton_exclude", ".linenos", "html")
app.add_config_value("copybutton_exclude", ".linenos, .gp", "html")

# DEPRECATE THIS AFTER THE NEXT RELEASE
app.add_config_value("copybutton_image_path", "", "html")
Expand Down

0 comments on commit 6094cf3

Please sign in to comment.