svn commit: r447275 - in head/textproc/py-sphinx: . files
Gabor Pali
pgj at FreeBSD.org
Thu Aug 3 18:49:47 UTC 2017
Author: pgj
Date: Thu Aug 3 18:49:46 2017
New Revision: 447275
URL: https://svnweb.freebsd.org/changeset/ports/447275
Log:
Backport fix for issue #3212
PR: 221116
Submitted by: pgj
Approved by: araujo (maintainer)
Obtained from: https://github.com/sphinx-doc/sphinx/issues/3212
MFH: 2017Q3
Added:
head/textproc/py-sphinx/files/patch-sphinx_writers_html.py (contents, props changed)
Modified:
head/textproc/py-sphinx/Makefile
Modified: head/textproc/py-sphinx/Makefile
==============================================================================
--- head/textproc/py-sphinx/Makefile Thu Aug 3 18:36:51 2017 (r447274)
+++ head/textproc/py-sphinx/Makefile Thu Aug 3 18:49:46 2017 (r447275)
@@ -3,7 +3,7 @@
PORTNAME= sphinx
PORTVERSION= 1.4.8
-PORTREVISION= 1
+PORTREVISION= 2
PORTEPOCH= 1
CATEGORIES= textproc python
MASTER_SITES= CHEESESHOP
Added: head/textproc/py-sphinx/files/patch-sphinx_writers_html.py
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/textproc/py-sphinx/files/patch-sphinx_writers_html.py Thu Aug 3 18:49:46 2017 (r447275)
@@ -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
More information about the svn-ports-head
mailing list