diff options
author | Gabor Pali <pgj@FreeBSD.org> | 2017-08-03 18:49:46 +0000 |
---|---|---|
committer | Gabor Pali <pgj@FreeBSD.org> | 2017-08-03 18:49:46 +0000 |
commit | 7c9d3894a4d3691d36f41b45db51503cc532434c (patch) | |
tree | e328c1ea33e7e42947089c6689ae31e7699286e1 /textproc/py-sphinx | |
parent | b3200ce6636dace01972e4e81759d7eada65ea9b (diff) | |
download | ports-7c9d3894a4d3691d36f41b45db51503cc532434c.tar.gz ports-7c9d3894a4d3691d36f41b45db51503cc532434c.zip |
Notes
Diffstat (limited to 'textproc/py-sphinx')
-rw-r--r-- | textproc/py-sphinx/Makefile | 2 | ||||
-rw-r--r-- | textproc/py-sphinx/files/patch-sphinx_writers_html.py | 27 |
2 files changed, 28 insertions, 1 deletions
diff --git a/textproc/py-sphinx/Makefile b/textproc/py-sphinx/Makefile index 711377df58d3..06ce3b7e56ee 100644 --- a/textproc/py-sphinx/Makefile +++ b/textproc/py-sphinx/Makefile @@ -3,7 +3,7 @@ PORTNAME= sphinx PORTVERSION= 1.4.8 -PORTREVISION= 1 +PORTREVISION= 2 PORTEPOCH= 1 CATEGORIES= textproc python MASTER_SITES= CHEESESHOP diff --git a/textproc/py-sphinx/files/patch-sphinx_writers_html.py b/textproc/py-sphinx/files/patch-sphinx_writers_html.py new file mode 100644 index 000000000000..dd967c1f7018 --- /dev/null +++ b/textproc/py-sphinx/files/patch-sphinx_writers_html.py @@ -0,0 +1,27 @@ +--- sphinx/writers/html.py.orig 2016-10-01 15:14:37 UTC ++++ sphinx/writers/html.py +@@ -16,6 +16,7 @@ import copy + import warnings + + from six import string_types ++import docutils + from docutils import nodes + from docutils.writers.html4css1 import Writer, HTMLTranslator as BaseTranslator + +@@ -497,6 +498,16 @@ class HTMLTranslator(BaseTranslator): + if 'height' not in node: + node['height'] = str(size[1]) + BaseTranslator.visit_image(self, node) ++ ++ # overwritten ++ def depart_image(self, node): ++ if docutils.__version__ >= "0.13": ++ # since docutils-0.13, HTMLWriter does not push context data on visit_image() ++ if node['uri'].lower().endswith(('svg', 'svgz')): ++ self.body.append(self.context.pop()) ++ else: ++ # docutils-0.12 or below, HTML Writer always push context data on visit_image() ++ self.body.append(self.context.pop()) + + def visit_toctree(self, node): + # this only happens when formatting a toc from env.tocs -- in this |