Skip to content

Commit 5f2627e

Browse files
committed
Add patch
1 parent 6e818e6 commit 5f2627e

4 files changed

Lines changed: 34 additions & 3 deletions

File tree

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ repos:
55
rev: v6.0.0
66
hooks:
77
- id: trailing-whitespace
8-
exclude: ^doc/static/
8+
exclude: ^doc/static/|\.patch$
99
- id: end-of-file-fixer
1010
exclude: ^doc/static/
1111
- id: check-yaml

dfetch.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ manifest:
2626
patch:
2727
- doc/_ext/patches/001-autoformat-sphinxcontrib.asciinema.patch
2828
- doc/_ext/patches/002-fix-options-sphinxcontrib.asciinema.patch
29+
- doc/_ext/patches/003-only-handle-html-sphinxcontrib.asciinema.patch
2930

3031
- name: inter-font
3132
remote: github
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
diff --git a/asciinema.py b/asciinema.py
2+
index 44dad260..be82899a 100644
3+
--- a/asciinema.py
4+
+++ b/asciinema.py
5+
@@ -10,6 +10,8 @@ logger = logging.getLogger(__name__)
6+
7+
8+
def copy_asset_files(app, exc):
9+
+ if app.builder.format != "html":
10+
+ return
11+
asset_dir = os.path.join(os.path.dirname(os.path.abspath(__file__)), "_static")
12+
if exc is None: # build succeeded
13+
for file in os.listdir(asset_dir):
14+
@@ -83,7 +85,6 @@ def visit_html(self, node):
15+
16+
17+
def visit_unsupported(self, node):
18+
- logger.warning("asciinema: unsupported output format (node skipped)")
19+
raise nodes.SkipNode
20+
21+
22+
@@ -177,6 +178,7 @@ class ASCIINemaDirective(SphinxDirective):
23+
24+
_NODE_VISITORS = {
25+
"html": (visit_html, depart),
26+
+ "epub": (visit_unsupported, None),
27+
"latex": (visit_unsupported, None),
28+
"man": (visit_unsupported, None),
29+
"texinfo": (visit_unsupported, None),

doc/_ext/sphinxcontrib_asciinema/.dfetch_data.yaml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,12 @@
22
# For more info see https://dfetch.rtfd.io/en/latest/getting_started.html
33
dfetch:
44
branch: master
5-
hash: dcd1473e1a3ca613b804e3e51e7ee342
6-
last_fetch: 22/03/2026, 19:52:31
5+
hash: c0665300cd7962033a3caafa7fc302e7
6+
last_fetch: 20/04/2026, 21:23:20
77
patch:
88
- doc/_ext/patches/001-autoformat-sphinxcontrib.asciinema.patch
99
- doc/_ext/patches/002-fix-options-sphinxcontrib.asciinema.patch
10+
- doc/_ext/patches/003-only-handle-html-sphinxcontrib.asciinema.patch
1011
remote_url: https://github.com/divi255/sphinxcontrib.asciinema.git
1112
revision: 5ee0c5be62236a5dee0032e1d8dd59957a0c1d4c
1213
tag: ''

0 commit comments

Comments
 (0)