Hello community,

here is the log from the commit of package python3-html2text for 
openSUSE:Factory checked in at 2015-02-20 12:01:54
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python3-html2text (Old)
 and      /work/SRC/openSUSE:Factory/.python3-html2text.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python3-html2text"

Changes:
--------
--- /work/SRC/openSUSE:Factory/python3-html2text/python3-html2text.changes      
2015-01-07 09:39:12.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.python3-html2text.new/python3-html2text.changes 
2015-02-20 12:01:56.000000000 +0100
@@ -1,0 +2,6 @@
+Fri Feb 20 06:13:40 UTC 2015 - [email protected]
+
+- update to version 2015.2.18:
+  * Fix #38: Anchor tags with empty text or with <img> tags inside are no 
longer stripped.
+
+-------------------------------------------------------------------

Old:
----
  html2text-2014.12.29.tar.gz

New:
----
  html2text-2015.2.18.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ python3-html2text.spec ++++++
--- /var/tmp/diff_new_pack.hHZ3zU/_old  2015-02-20 12:01:56.000000000 +0100
+++ /var/tmp/diff_new_pack.hHZ3zU/_new  2015-02-20 12:01:56.000000000 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package python3-html2text
 #
-# Copyright (c) 2015 SUSE LINUX Products GmbH, Nuernberg, Germany.
+# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany.
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -17,7 +17,7 @@
 
 
 Name:           python3-html2text
-Version:        2014.12.29
+Version:        2015.2.18
 Release:        0
 Url:            https://github.com/Alir3z4/html2text/
 Summary:        Turn HTML into equivalent Markdown-structured text

++++++ html2text-2014.12.29.tar.gz -> html2text-2015.2.18.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/html2text-2014.12.29/AUTHORS.rst 
new/html2text-2015.2.18/AUTHORS.rst
--- old/html2text-2014.12.29/AUTHORS.rst        2014-12-29 08:30:17.000000000 
+0100
+++ new/html2text-2015.2.18/AUTHORS.rst 2015-02-18 14:16:15.000000000 +0100
@@ -1,17 +1,18 @@
-``html2text`` was Originally written by Aaron Swartz.
+``html2text`` was originally written by Aaron Swartz.
 
 The AUTHORS/Contributors are (and/or have been):
 
-    * Aaron Swartz
-    * Yariv Barkan
-    * Alex Musayev
-    * Matěj Cepl
-    * Stefano Rivera
-    * Alireza Savand <[email protected]>
-    * Ivan Gromov <[email protected]>
-    * Jocelyn Delalande <[email protected]>
-    * Matt Dorn <[email protected]>
+* Aaron Swartz
+* Yariv Barkan
+* Alex Musayev
+* Matěj Cepl
+* Stefano Rivera
+* Alireza Savand <[email protected]>
+* Ivan Gromov <[email protected]>
+* Jocelyn Delalande <[email protected]>
+* Matt Dorn <[email protected]>
+* Miguel Tavares <[email protected]>
 
 Maintainer:
 
-    * Alireza Savand <[email protected]>
+* Alireza Savand <[email protected]>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/html2text-2014.12.29/ChangeLog.rst 
new/html2text-2015.2.18/ChangeLog.rst
--- old/html2text-2014.12.29/ChangeLog.rst      2014-12-29 08:32:53.000000000 
+0100
+++ new/html2text-2015.2.18/ChangeLog.rst       2015-02-18 14:20:44.000000000 
+0100
@@ -1,3 +1,10 @@
+2015.2.18
+==========
+----
+
+* Fix #38: Anchor tags with empty text or with `<img>` tags inside are no 
longer stripped.
+
+
 2014.12.29
 ==========
 ----
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/html2text-2014.12.29/PKG-INFO 
new/html2text-2015.2.18/PKG-INFO
--- old/html2text-2014.12.29/PKG-INFO   2014-12-29 08:35:48.000000000 +0100
+++ new/html2text-2015.2.18/PKG-INFO    2015-02-18 14:23:58.000000000 +0100
@@ -1,6 +1,6 @@
 Metadata-Version: 1.1
 Name: html2text
-Version: 2014.12.29
+Version: 2015.2.18
 Summary: Turn HTML into equivalent Markdown-structured text.
 Home-page: https://github.com/Alir3z4/html2text/
 Author: Alireza Savand
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/html2text-2014.12.29/html2text/__init__.py 
new/html2text-2015.2.18/html2text/__init__.py
--- old/html2text-2014.12.29/html2text/__init__.py      2014-12-29 
08:33:15.000000000 +0100
+++ new/html2text-2015.2.18/html2text/__init__.py       2015-02-18 
14:16:15.000000000 +0100
@@ -84,6 +84,7 @@
         self.a = []
         self.astack = []
         self.maybe_automatic_link = None
+        self.empty_link = False
         self.absolute_url_matcher = re.compile(r'^[a-zA-Z+]+://')
         self.acount = 0
         self.list = []
@@ -370,6 +371,7 @@
                                  attrs['href'].startswith('#')):
                     self.astack.append(attrs)
                     self.maybe_automatic_link = attrs['href']
+                    self.empty_link = True
                     if self.protect_links:
                         attrs['href'] = '<'+attrs['href']+'>'
                 else:
@@ -377,9 +379,13 @@
             else:
                 if self.astack:
                     a = self.astack.pop()
-                    if self.maybe_automatic_link:
+                    if self.maybe_automatic_link and not self.empty_link:
                         self.maybe_automatic_link = None
                     elif a:
+                        if self.empty_link:
+                            self.o("[")
+                            self.empty_link = False
+                            self.maybe_automatic_link = None
                         if self.inline_links:
                             self.o("](" + escape_md(a['href']) + ")")
                         else:
@@ -399,6 +405,19 @@
                     attrs['href'] = attrs['src']
                 alt = attrs.get('alt') or ''
 
+                # If we have a link to create, output the start
+                if not self.maybe_automatic_link is None:
+                    href = self.maybe_automatic_link
+                    if self.images_to_alt and escape_md(alt) == href and \
+                            self.absolute_url_matcher.match(href):
+                        self.o("<" + escape_md(alt) + ">")
+                        self.empty_link = False
+                        return
+                    else:
+                        self.o("[")
+                        self.maybe_automatic_link = None
+                        self.empty_link = False                   
+
                 # If we have images_to_alt, we discard the image itself,
                 # considering only the alt text.
                 if self.images_to_alt:
@@ -637,10 +656,12 @@
             href = self.maybe_automatic_link
             if href == data and self.absolute_url_matcher.match(href):
                 self.o("<" + data + ">")
+                self.empty_link = False
                 return
             else:
                 self.o("[")
                 self.maybe_automatic_link = None
+                self.empty_link = False
 
         if not self.code and not self.pre:
             data = escape_md_section(data, snob=self.escape_snob)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/html2text-2014.12.29/html2text.egg-info/PKG-INFO 
new/html2text-2015.2.18/html2text.egg-info/PKG-INFO
--- old/html2text-2014.12.29/html2text.egg-info/PKG-INFO        2014-12-29 
08:35:47.000000000 +0100
+++ new/html2text-2015.2.18/html2text.egg-info/PKG-INFO 2015-02-18 
14:23:58.000000000 +0100
@@ -1,6 +1,6 @@
 Metadata-Version: 1.1
 Name: html2text
-Version: 2014.12.29
+Version: 2015.2.18
 Summary: Turn HTML into equivalent Markdown-structured text.
 Home-page: https://github.com/Alir3z4/html2text/
 Author: Alireza Savand
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/html2text-2014.12.29/html2text.egg-info/SOURCES.txt 
new/html2text-2015.2.18/html2text.egg-info/SOURCES.txt
--- old/html2text-2014.12.29/html2text.egg-info/SOURCES.txt     2014-12-29 
08:35:47.000000000 +0100
+++ new/html2text-2015.2.18/html2text.egg-info/SOURCES.txt      2015-02-18 
14:23:58.000000000 +0100
@@ -33,8 +33,12 @@
 test/doc_with_table_bypass.md
 test/emdash-para.html
 test/emdash-para.md
+test/empty-link.html
+test/empty-link.md
 test/images_to_alt.html
 test/images_to_alt.md
+test/img-tag-with-link.html
+test/img-tag-with-link.md
 test/invalid_start.html
 test/invalid_start.md
 test/nbsp.html
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/html2text-2014.12.29/setup.py 
new/html2text-2015.2.18/setup.py
--- old/html2text-2014.12.29/setup.py   2014-12-29 08:33:05.000000000 +0100
+++ new/html2text-2015.2.18/setup.py    2015-02-18 14:20:44.000000000 +0100
@@ -34,7 +34,7 @@
 
 setup(
     name="html2text",
-    version="2014.12.29",
+    version="2015.2.18",
     description="Turn HTML into equivalent Markdown-structured text.",
     author="Aaron Swartz",
     author_email="[email protected]",
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/html2text-2014.12.29/test/empty-link.html 
new/html2text-2015.2.18/test/empty-link.html
--- old/html2text-2014.12.29/test/empty-link.html       1970-01-01 
01:00:00.000000000 +0100
+++ new/html2text-2015.2.18/test/empty-link.html        2015-02-18 
14:16:15.000000000 +0100
@@ -0,0 +1,6 @@
+<h1>Processing empty hyperlinks</h1>
+
+<p>This test checks wheter empty hyperlinks still appear in the markdown 
result.</p>
+
+<a href="http://some.link";></a>
+<a href="http://some.link";><p></p></a>
\ No newline at end of file
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/html2text-2014.12.29/test/empty-link.md 
new/html2text-2015.2.18/test/empty-link.md
--- old/html2text-2014.12.29/test/empty-link.md 1970-01-01 01:00:00.000000000 
+0100
+++ new/html2text-2015.2.18/test/empty-link.md  2015-02-18 14:16:15.000000000 
+0100
@@ -0,0 +1,8 @@
+# Processing empty hyperlinks
+
+This test checks wheter empty hyperlinks still appear in the markdown result.
+
+[](http://some.link)
+
+[](http://some.link)
+
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/html2text-2014.12.29/test/images_to_alt.html 
new/html2text-2015.2.18/test/images_to_alt.html
--- old/html2text-2014.12.29/test/images_to_alt.html    2014-12-24 
20:35:10.000000000 +0100
+++ new/html2text-2015.2.18/test/images_to_alt.html     2015-02-18 
14:16:15.000000000 +0100
@@ -1,3 +1,7 @@
 <a href="http://example.com";>
 <img src="http://example.com/img.png"; alt="ALT TEXT" />
 </a>
+<br>
+<a href="http://example.com";><img src="http://example.com/img.png"; alt="ALT 
TEXT" /></a>
+<br>
+<a href="http://example.com";><img src="http://example.com/img.png"; 
alt="http://example.com"; /></a>
\ No newline at end of file
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/html2text-2014.12.29/test/images_to_alt.md 
new/html2text-2015.2.18/test/images_to_alt.md
--- old/html2text-2014.12.29/test/images_to_alt.md      2014-12-24 
20:35:10.000000000 +0100
+++ new/html2text-2015.2.18/test/images_to_alt.md       2015-02-18 
14:16:15.000000000 +0100
@@ -1,2 +1,4 @@
-[ ALT TEXT ](http://example.com)
+[ ALT TEXT ](http://example.com)  
+[ALT TEXT](http://example.com)  
+<http://example.com>
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/html2text-2014.12.29/test/img-tag-with-link.html 
new/html2text-2015.2.18/test/img-tag-with-link.html
--- old/html2text-2014.12.29/test/img-tag-with-link.html        1970-01-01 
01:00:00.000000000 +0100
+++ new/html2text-2015.2.18/test/img-tag-with-link.html 2015-02-18 
14:16:15.000000000 +0100
@@ -0,0 +1,9 @@
+<h1>Processing images with links</h1>
+
+<p>This test checks images with associated links.</p>
+
+<a href="http://some.link";><img src="http://placehold.it/350x150#(banana)" 
width="350" height="150" alt="(banana)"></a>
+<a href="http://some.link";><img src="http://placehold.it/350x150#[banana]"; 
width="350" height="150" alt="[banana]"></a>
+<a href="http://some.link";><img src="http://placehold.it/350x150#{banana}"; 
width="350" height="150" alt="{banana}"></a>
+<a href="http://some.link";><img src="http://placehold.it/350x150#([{}])" 
width="350" height="150" alt="([{}])"></a>
+<a href="http://some.link";><img src="http://placehold.it/350x150#([{}])" 
width="350" height="150" alt></a>
\ No newline at end of file
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/html2text-2014.12.29/test/img-tag-with-link.md 
new/html2text-2015.2.18/test/img-tag-with-link.md
--- old/html2text-2014.12.29/test/img-tag-with-link.md  1970-01-01 
01:00:00.000000000 +0100
+++ new/html2text-2015.2.18/test/img-tag-with-link.md   2015-02-18 
14:16:15.000000000 +0100
@@ -0,0 +1,10 @@
+# Processing images with links
+
+This test checks images with associated links.
+
+[![\(banana\)](http://placehold.it/350x150#\(banana\))](http://some.link)
+[![\[banana\]](http://placehold.it/350x150#\[banana\])](http://some.link)
+[![{banana}](http://placehold.it/350x150#{banana})](http://some.link)
+[![\(\[{}\]\)](http://placehold.it/350x150#\(\[{}\]\))](http://some.link)
+[![](http://placehold.it/350x150#\(\[{}\]\))](http://some.link)
+

-- 
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to