[DRE-commits] [ruby-github-markup] 01/03: add docutils 0.13 compat patch

Praveen Arimbrathodiyil praveen at moszumanska.debian.org
Sat Dec 24 08:29:47 UTC 2016


This is an automated email from the git hooks/post-receive script.

praveen pushed a commit to branch master
in repository ruby-github-markup.

commit 8081c7d35e0cef36063ff74ebb3406a2d1cba539
Author: Praveen Arimbrathodiyil <praveen at debian.org>
Date:   Sat Dec 24 13:51:38 2016 +0530

    add docutils 0.13 compat patch
---
 debian/patches/docutils-013.patch | 35 +++++++++++++++++++++++++++++++++++
 debian/patches/series             |  1 +
 2 files changed, 36 insertions(+)

diff --git a/debian/patches/docutils-013.patch b/debian/patches/docutils-013.patch
new file mode 100644
index 0000000..c8f1514
--- /dev/null
+++ b/debian/patches/docutils-013.patch
@@ -0,0 +1,35 @@
+From e97e4769e1e43fa27193596e968d529537c94f6c Mon Sep 17 00:00:00 2001
+From: Dmitry Shachnev <mitya57 at gmail.com>
+Date: Thu, 22 Dec 2016 11:06:39 +0300
+Subject: [PATCH] Make rest2html work with docutils 0.13
+
+In that docutils version, HTMLTranslator.visit_image no longer appends
+empty string to self.context, so trying to pop() from there raises an
+IndexError.
+
+Instead of the hard-coded pop call, call the overridden method, which will
+call pop() on docutils 0.12 and will do nothing on docutils 0.13.
+
+Fixes #971.
+
+Also, fix the comment indentation.
+---
+ lib/github/commands/rest2html | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/lib/github/commands/rest2html b/lib/github/commands/rest2html
+index 7ecfe27..fff69fc 100755
+--- a/lib/github/commands/rest2html
++++ b/lib/github/commands/rest2html
+@@ -139,9 +139,9 @@ class GitHubHTMLTranslator(HTMLTranslator):
+ 
+             # toss off `object` tag
+             self.body.pop()
+-        # add on `img` with attributes
++            # add on `img` with attributes
+             self.body.append(self.starttag(node, 'img', **atts))
+-        self.body.append(self.context.pop())
++        HTMLTranslator.depart_image(self, node)
+ 
+ 
+ def kbd(name, rawtext, text, lineno, inliner, options=None, content=None):
diff --git a/debian/patches/series b/debian/patches/series
index 9a7b0bd..0b973fd 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1 +1,2 @@
 fix-version.patch
+docutils-013.patch

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-ruby-extras/ruby-github-markup.git



More information about the Pkg-ruby-extras-commits mailing list