From 8995e405ac597185e18eb99c085a5416ed5473b9 Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: Apr 10 2018 05:33:13 +0000 Subject: import python-docutils-0.11-0.3.20130715svn7687.el7 --- diff --git a/SOURCES/fix-spurious-table-column-alignment-errors.patch b/SOURCES/fix-spurious-table-column-alignment-errors.patch new file mode 100644 index 0000000..a9eee56 --- /dev/null +++ b/SOURCES/fix-spurious-table-column-alignment-errors.patch @@ -0,0 +1,75 @@ +diff --git a/docutils/parsers/rst/tableparser.py b/docutils/parsers/rst/tableparser.py +index 2cd3879..fd24424 100644 +--- a/docutils/parsers/rst/tableparser.py ++++ b/docutils/parsers/rst/tableparser.py +@@ -511,8 +511,8 @@ class SimpleTableParser(TableParser): + if i == lastcol and line[end:].strip(): + text = line[start:].rstrip() + new_end = start + len(text) +- columns[i] = (start, new_end) + main_start, main_end = self.columns[-1] ++ columns[i] = (start, max(main_end, new_end)) + if new_end > main_end: + self.columns[-1] = (main_start, new_end) + elif line[end:nextstart].strip(): +diff --git a/test/test_parsers/test_rst/test_tables.py b/test/test_parsers/test_rst/test_tables.py +index ed7e177..28b8070 100755 +--- a/test/test_parsers/test_rst/test_tables.py ++++ b/test/test_parsers/test_rst/test_tables.py +@@ -789,6 +789,56 @@ A table with three columns. + """], + ["""\ + ============== ====== ++A simple table this text extends to the right ++cell 3 as does this text ++============== ====== ++""", ++"""\ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ A simple table ++ ++ ++ this text extends to the right ++ ++ ++ ++ cell 3 ++ ++ ++ as does this text ++"""], ++["""\ ++============== ====== ++A simple table this text extends to the right ++ continuation of cell 2 ++============== ====== ++""", ++"""\ ++ ++
++ ++ ++ ++ ++ ++ ++ ++ A simple table ++ ++ ++ this text extends to the right ++ continuation of cell 2 ++"""], ++["""\ ++============== ====== + A simple table with + no bottom border + """, diff --git a/SPECS/python-docutils.spec b/SPECS/python-docutils.spec index bb00be5..712b181 100644 --- a/SPECS/python-docutils.spec +++ b/SPECS/python-docutils.spec @@ -11,7 +11,7 @@ Name: python-%{srcname} Version: 0.11 -Release: 0.2.20130715svn7687%{?dist} +Release: 0.3.20130715svn7687%{?dist} Summary: System for processing plaintext documentation Group: Development/Languages @@ -26,6 +26,10 @@ URL: http://docutils.sourceforge.net # The tarball is in dist/docutils-VERSION.tar.gz Source0: %{srcname}-%{version}.tar.gz +# Fix spurious table column alignment errors. +# Fixed upstream: https://sourceforge.net/p/docutils/code/7898/ +Patch1: fix-spurious-table-column-alignment-errors.patch + # Disable some tests known to fail with Python 3.3 # Bug reports filed upstream as: # https://sourceforge.net/tracker/?func=detail&aid=3555164&group_id=38414&atid=422030 @@ -80,6 +84,7 @@ This package contains the module, ported to run under python3. %prep %setup -q -n %{srcname}-%{version} +%patch1 -p1 %patch100 -p1 -b .disable-failing-tests # Remove shebang from library files @@ -161,6 +166,10 @@ rm -rf %{buildroot} %endif %changelog +* Tue Oct 10 2017 Charalampos Stratakis - 0.11-0.3.20130715svn7687 +- Fix spurious table column alignment errors. +Resolves: rhbz#1479804 + * Fri Dec 27 2013 Daniel Mach - 0.11-0.2.20130715svn7687 - Mass rebuild 2013-12-27