summaryrefslogtreecommitdiffstats
path: root/debian/patches/data_uris.diff
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-09-19 04:57:10 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-09-19 04:57:10 +0000
commit0179f223f35d29ba51dd5a077e9ee48d73983d97 (patch)
tree0096f5a59dd006bc1e6ec8ecffdc9c1bc73066f6 /debian/patches/data_uris.diff
parentMerging upstream version 7.4.7. (diff)
downloadsphinx-0179f223f35d29ba51dd5a077e9ee48d73983d97.tar.xz
sphinx-0179f223f35d29ba51dd5a077e9ee48d73983d97.zip
Merging debian version 7.4.7-1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r--debian/patches/data_uris.diff66
1 files changed, 0 insertions, 66 deletions
diff --git a/debian/patches/data_uris.diff b/debian/patches/data_uris.diff
deleted file mode 100644
index 37dd50a..0000000
--- a/debian/patches/data_uris.diff
+++ /dev/null
@@ -1,66 +0,0 @@
-From: James Addison <55152140+jayaddison@users.noreply.github.com>
-Date: Wed, 3 Jul 2024 02:16:43 +0100
-Subject: Regression: restore extraction of data-URI images from source for
- builders whose output formats do not support them natively (#12344)
-
-(cherry picked from commit 778013f91a650f585bd7bf346d781d5bd9392e46)
----
- sphinx/transforms/post_transforms/images.py | 4 +---
- tests/roots/test-images/index.rst | 5 +++++
- tests/test_builders/test_build_latex.py | 1 +
- tests/test_builders/test_build_texinfo.py | 1 +
- 4 files changed, 8 insertions(+), 3 deletions(-)
-
-diff --git a/sphinx/transforms/post_transforms/images.py b/sphinx/transforms/post_transforms/images.py
-index 18ad51d..9a6e1be 100644
---- a/sphinx/transforms/post_transforms/images.py
-+++ b/sphinx/transforms/post_transforms/images.py
-@@ -115,10 +115,8 @@ class DataURIExtractor(BaseImageConverter):
- default_priority = 150
-
- def match(self, node: nodes.image) -> bool:
-- if not self.app.builder.supported_remote_images:
-- return False
- if self.app.builder.supported_data_uri_images is True:
-- return False
-+ return False # do not transform the image; data URIs are valid in the build output
- return node['uri'].startswith('data:')
-
- def handle(self, node: nodes.image) -> None:
-diff --git a/tests/roots/test-images/index.rst b/tests/roots/test-images/index.rst
-index 9b9aac1..f6d7160 100644
---- a/tests/roots/test-images/index.rst
-+++ b/tests/roots/test-images/index.rst
-@@ -27,3 +27,8 @@ test-image
-
- .. non-exist remote image
- .. image:: http://localhost:7777/NOT_EXIST.PNG
-+
-+.. a self-contained image within a data URI
-+ This image was generated using ImageMagick 6.9 with the command ``convert -pointsize 32 -font Noto-Sans-Egyptian-Hieroglyphs-Regular caption:$(printf '\U13080') -trim -border 2 -monochrome eoh.png``
-+.. image:: data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACoAAAAjAQAAAADKt6U+AAAAAmJLR0QAAd2KE6QAAAAHdElNRQfoBQIVBgOBlOMTAAAAEGNhTnYAAAAtAAAAOwAAAAEAAAATst46RgAAAJtJREFUCNdNz70KwkAMAOA8iOhjuGh9HB9BCtoTHHwMH0Mc7KWTmx0dHDpovUk6HCil3sUmATHLR/4IAeJA+LEWPmbEeHJMWbTMZDA0CNFn8x1COFPaIHQ55R7hlZGdIjwj2aovRjJbhPvMLNN+r0g2vB7ByIWbHqqVh3LR3lhZWM0qYV8qjU6+lc4J7ZVx4SjEINBKOSinv/+YL1xvsJE6ztdqAAAADHRFWHRjYXB0aW9uAPCTgoD4hdKUAAAAD3RFWHRjYXB0aW9uOmxpbmVzADGoBz2RAAAAAElFTkSuQmCC
-+ :alt: The Eye of Horus in a black font on a white background.
-diff --git a/tests/test_builders/test_build_latex.py b/tests/test_builders/test_build_latex.py
-index 0776c74..ba8fc62 100644
---- a/tests/test_builders/test_build_latex.py
-+++ b/tests/test_builders/test_build_latex.py
-@@ -1710,6 +1710,7 @@ def test_copy_images(app, status, warning):
- }
- images.discard('sphinx.png')
- assert images == {
-+ 'ba30773957c3fe046897111afd65a80b81cad089.png', # latex: image from data:image/png URI in source
- 'img.pdf',
- 'rimg.png',
- 'testimäge.png',
-diff --git a/tests/test_builders/test_build_texinfo.py b/tests/test_builders/test_build_texinfo.py
-index f9effb2..3b8e276 100644
---- a/tests/test_builders/test_build_texinfo.py
-+++ b/tests/test_builders/test_build_texinfo.py
-@@ -124,6 +124,7 @@ def test_copy_images(app, status, warning):
- images = {image.name for image in images_dir.rglob('*')}
- images.discard('python-logo.png')
- assert images == {
-+ 'ba30773957c3fe046897111afd65a80b81cad089.png', # texinfo: image from data:image/png URI in source
- 'img.png',
- 'rimg.png',
- 'testimäge.png',