Hello community, here is the log from the commit of package python-Markdown for openSUSE:Factory checked in at 2014-11-28 08:44:40 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-Markdown (Old) and /work/SRC/openSUSE:Factory/.python-Markdown.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Package is "python-Markdown" Changes: -------- --- /work/SRC/openSUSE:Factory/python-Markdown/python-Markdown.changes 2014-10-05 20:33:28.000000000 +0200 +++ /work/SRC/openSUSE:Factory/.python-Markdown.new/python-Markdown.changes 2014-11-28 08:44:43.000000000 +0100 @@ -1,0 +2,5 @@ +Mon Nov 24 17:35:36 UTC 2014 - benoit.monin@gmx.fr + +- update to version 2.5.2: bugfix release + +------------------------------------------------------------------- Old: ---- Markdown-2.5.1.tar.gz New: ---- Markdown-2.5.2.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-Markdown.spec ++++++ --- /var/tmp/diff_new_pack.vOtF8Q/_old 2014-11-28 08:44:44.000000000 +0100 +++ /var/tmp/diff_new_pack.vOtF8Q/_new 2014-11-28 08:44:44.000000000 +0100 @@ -17,7 +17,7 @@ Name: python-Markdown -Version: 2.5.1 +Version: 2.5.2 Release: 0 Summary: Python implementation of Markdown License: BSD-3-Clause ++++++ Markdown-2.5.1.tar.gz -> Markdown-2.5.2.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Markdown-2.5.1/PKG-INFO new/Markdown-2.5.2/PKG-INFO --- old/Markdown-2.5.1/PKG-INFO 2014-09-27 00:40:21.000000000 +0200 +++ new/Markdown-2.5.2/PKG-INFO 2014-11-20 03:13:55.000000000 +0100 @@ -1,12 +1,12 @@ -Metadata-Version: 1.0 +Metadata-Version: 1.1 Name: Markdown -Version: 2.5.1 +Version: 2.5.2 Summary: Python implementation of Markdown. Home-page: https://pythonhosted.org/Markdown/ Author: Waylan Limberg Author-email: waylan [at] gmail.com License: BSD License -Download-URL: http://pypi.python.org/packages/source/M/Markdown/Markdown-2.5.1.tar.gz +Download-URL: http://pypi.python.org/packages/source/M/Markdown/Markdown-2.5.2.tar.gz Description: This is a Python implementation of John Gruber's Markdown_. It is almost completely compliant with the reference implementation, though there are a few known issues. See Features_ for information diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Markdown-2.5.1/docs/extensions/nl2br.txt new/Markdown-2.5.2/docs/extensions/nl2br.txt --- old/Markdown-2.5.1/docs/extensions/nl2br.txt 2014-09-13 02:32:11.000000000 +0200 +++ new/Markdown-2.5.2/docs/extensions/nl2br.txt 2014-11-03 05:43:58.000000000 +0100 @@ -23,7 +23,7 @@ ... Line 1 ... Line 2 ... """ - >>> html = markdown.markdown(text, extensions=['nl2br']) + >>> html = markdown.markdown(text, extensions=['markdown.extensions.nl2br']) >>> print html <p>Line 1<br /> Line 2</p> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Markdown-2.5.1/markdown/__init__.py new/Markdown-2.5.2/markdown/__init__.py --- old/Markdown-2.5.1/markdown/__init__.py 2014-09-26 04:31:04.000000000 +0200 +++ new/Markdown-2.5.2/markdown/__init__.py 2014-11-14 04:18:21.000000000 +0100 @@ -180,7 +180,7 @@ ext = self.build_extension(ext, configs.get(ext, {})) if isinstance(ext, Extension): ext.extendMarkdown(self, globals()) - logger.info('Successfully loaded extension "%s.%s".' + logger.debug('Successfully loaded extension "%s.%s".' % (ext.__class__.__module__, ext.__class__.__name__)) elif ext is not None: raise TypeError( diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Markdown-2.5.1/markdown/__version__.py new/Markdown-2.5.2/markdown/__version__.py --- old/Markdown-2.5.1/markdown/__version__.py 2014-09-27 00:31:53.000000000 +0200 +++ new/Markdown-2.5.2/markdown/__version__.py 2014-11-20 03:04:29.000000000 +0100 @@ -5,7 +5,7 @@ # (major, minor, micro, alpha/beta/rc/final, #) # (1, 1, 2, 'alpha', 0) => "1.1.2.dev" # (1, 2, 0, 'beta', 2) => "1.2b2" -version_info = (2, 5, 1, 'final', 0) +version_info = (2, 5, 2, 'final', 0) def _get_version(): " Returns a PEP 386-compliant version number from version_info. " diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Markdown-2.5.1/markdown/extensions/codehilite.py new/Markdown-2.5.2/markdown/extensions/codehilite.py --- old/Markdown-2.5.1/markdown/extensions/codehilite.py 2014-08-26 03:30:47.000000000 +0200 +++ new/Markdown-2.5.2/markdown/extensions/codehilite.py 2014-11-03 05:43:58.000000000 +0100 @@ -22,8 +22,8 @@ import warnings try: from pygments import highlight - from pygments.lexers import get_lexer_by_name, guess_lexer, TextLexer - from pygments.formatters import HtmlFormatter + from pygments.lexers import get_lexer_by_name, guess_lexer + from pygments.formatters import get_formatter_by_name pygments = True except ImportError: pygments = False @@ -109,14 +109,15 @@ if self.guess_lang: lexer = guess_lexer(self.src) else: - lexer = TextLexer() + lexer = get_lexer_by_name('text') except ValueError: - lexer = TextLexer() - formatter = HtmlFormatter(linenos=self.linenums, - cssclass=self.css_class, - style=self.style, - noclasses=self.noclasses, - hl_lines=self.hl_lines) + lexer = get_lexer_by_name('text') + formatter = get_formatter_by_name('html', + linenos=self.linenums, + cssclass=self.css_class, + style=self.style, + noclasses=self.noclasses, + hl_lines=self.hl_lines) return highlight(self.src, lexer, formatter) else: # just escape and build markup usable by JS highlighting libs @@ -247,4 +248,3 @@ def makeExtension(*args, **kwargs): return CodeHiliteExtension(*args, **kwargs) - diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Markdown-2.5.1/markdown/extensions/toc.py new/Markdown-2.5.2/markdown/extensions/toc.py --- old/Markdown-2.5.1/markdown/extensions/toc.py 2014-09-26 04:31:04.000000000 +0200 +++ new/Markdown-2.5.2/markdown/extensions/toc.py 2014-11-18 05:32:47.000000000 +0100 @@ -27,60 +27,59 @@ [{'level': 1}, {'level': 2}] => [{'level': 1, 'children': [{'level': 2, 'children': []}]}] - + A wrong list is also converted: [{'level': 2}, {'level': 1}] => [{'level': 2, 'children': []}, {'level': 1, 'children': []}] """ - - def build_correct(remaining_list, prev_elements=[{'level': 1000}]): - - if not remaining_list: - return [], [] - - current = remaining_list.pop(0) - if not 'children' in current.keys(): - current['children'] = [] - - if not prev_elements: - # This happens for instance with [8, 1, 1], ie. when some - # header level is outside a scope. We treat it as a - # top-level - next_elements, children = build_correct(remaining_list, [current]) - current['children'].append(children) - return [current] + next_elements, [] - - prev_element = prev_elements.pop() - children = [] - next_elements = [] - # Is current part of the child list or next list? - if current['level'] > prev_element['level']: - #print "%d is a child of %d" % (current['level'], prev_element['level']) - prev_elements.append(prev_element) - prev_elements.append(current) - prev_element['children'].append(current) - next_elements2, children2 = build_correct(remaining_list, prev_elements) - children += children2 - next_elements += next_elements2 - else: - #print "%d is ancestor of %d" % (current['level'], prev_element['level']) - if not prev_elements: - #print "No previous elements, so appending to the next set" - next_elements.append(current) - prev_elements = [current] - next_elements2, children2 = build_correct(remaining_list, prev_elements) - current['children'].extend(children2) + + ordered_list = [] + if len(toc_list): + # Initialize everything by processing the first entry + last = toc_list.pop(0) + last['children'] = [] + levels = [last['level']] + ordered_list.append(last) + parents = [] + + # Walk the rest nesting the entries properly + while toc_list: + t = toc_list.pop(0) + current_level = t['level'] + t['children'] = [] + + # Reduce depth if current level < last item's level + if current_level < levels[-1]: + # Pop last level since we know we are less than it + levels.pop() + + # Pop parents and levels we are less than or equal to + to_pop = 0 + for p in reversed(parents): + if current_level <= p['level']: + to_pop += 1 + else: + break + if to_pop: + levels = levels[:-to_pop] + parents = parents[:-to_pop] + + # Note current level as last + levels.append(current_level) + + # Level is the same, so append to the current parent (if available) + if current_level == levels[-1]: + (parents[-1]['children'] if parents else ordered_list).append(t) + + # Current level is > last item's level, + # So make last item a parent and append current as child else: - #print "Previous elements, comparing to those first" - remaining_list.insert(0, current) - next_elements2, children2 = build_correct(remaining_list, prev_elements) - children.extend(children2) - next_elements += next_elements2 - - return next_elements, children - - ordered_list, __ = build_correct(toc_list) + last['children'].append(t) + parents.append(last) + levels.append(current_level) + last = t + return ordered_list diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Markdown-2.5.1/markdown/inlinepatterns.py new/Markdown-2.5.2/markdown/inlinepatterns.py --- old/Markdown-2.5.1/markdown/inlinepatterns.py 2014-09-27 00:30:31.000000000 +0200 +++ new/Markdown-2.5.2/markdown/inlinepatterns.py 2014-11-18 05:32:47.000000000 +0100 @@ -101,8 +101,8 @@ ESCAPE_RE = r'\\(.)' # \< EMPHASIS_RE = r'(\*)([^\*]+)\2' # *emphasis* STRONG_RE = r'(\*{2}|_{2})(.+?)\2' # **strong** -EM_STRONG_RE = r'(\*|_){3}(.+?)\2(.*?)\2{2}' # ***strongem*** or ***em*strong** -STRONG_EM_RE = r'(\*|_){3}(.+?)\2{2}(.*?)\2' # ***strong**em* +EM_STRONG_RE = r'(\*|_)\2{2}(.+?)\2(.*?)\2{2}' # ***strongem*** or ***em*strong** +STRONG_EM_RE = r'(\*|_)\2{2}(.+?)\2{2}(.*?)\2' # ***strong**em* SMART_EMPHASIS_RE = r'(?<!\w)(_)(?!_)(.+?)(?<!_)\2(?!\w)' # _smart_emphasis_ EMPHASIS_2_RE = r'(_)(.+?)\2' # _emphasis_ LINK_RE = NOIMG + BRK + \ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Markdown-2.5.1/markdown/preprocessors.py new/Markdown-2.5.2/markdown/preprocessors.py --- old/Markdown-2.5.1/markdown/preprocessors.py 2014-07-12 03:09:09.000000000 +0200 +++ new/Markdown-2.5.2/markdown/preprocessors.py 2014-11-20 03:01:25.000000000 +0100 @@ -174,9 +174,10 @@ else: # raw html if len(items) - right_listindex <= 1: # last element right_listindex -= 1 + offset = 1 if i == right_listindex else 0 placeholder = self.markdown.htmlStash.store('\n\n'.join( - items[i:right_listindex + 1])) - del items[i:right_listindex + 1] + items[i:right_listindex + offset])) + del items[i:right_listindex + offset] items.insert(i, placeholder) return items diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Markdown-2.5.1/markdown/treeprocessors.py new/Markdown-2.5.2/markdown/treeprocessors.py --- old/Markdown-2.5.1/markdown/treeprocessors.py 2014-09-27 00:30:31.000000000 +0200 +++ new/Markdown-2.5.2/markdown/treeprocessors.py 2014-11-03 05:43:58.000000000 +0100 @@ -132,7 +132,7 @@ childResult = self.__processPlaceholders(text, subnode, isText) if not isText and node is not subnode: - pos = list(node).index(subnode) + pos = list(node).index(subnode) + 1 else: pos = 0 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Markdown-2.5.1/tests/extensions/extra/raw-html.html new/Markdown-2.5.2/tests/extensions/extra/raw-html.html --- old/Markdown-2.5.1/tests/extensions/extra/raw-html.html 2014-05-23 00:35:13.000000000 +0200 +++ new/Markdown-2.5.2/tests/extensions/extra/raw-html.html 2014-11-20 03:01:25.000000000 +0100 @@ -27,11 +27,18 @@ Raw html blocks may also be nested. </div> - - </div> <p>This text is after the markdown in html.</p> <div name="issue308"> <p><span>1</span> <span>2</span></p> -</div> \ No newline at end of file +</div> +<div name="issue368"> +<p>Markdown is <em>active</em> here.</p> +<div name="RawHtml"> +Raw html blocks may also be nested. +</div> + +<p>Markdown is <em>still</em> active here.</p> +</div> +<p>Markdown is <em>active again</em> here.</p> \ No newline at end of file diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Markdown-2.5.1/tests/extensions/extra/raw-html.txt new/Markdown-2.5.2/tests/extensions/extra/raw-html.txt --- old/Markdown-2.5.1/tests/extensions/extra/raw-html.txt 2014-05-23 00:35:13.000000000 +0200 +++ new/Markdown-2.5.2/tests/extensions/extra/raw-html.txt 2014-11-20 03:01:25.000000000 +0100 @@ -51,3 +51,17 @@ <span>2</span> </div> + +<div markdown="1" name="issue368"> + +Markdown is *active* here. + +<div name="RawHtml"> +Raw html blocks may also be nested. +</div> + +Markdown is *still* active here. + +</div> + +Markdown is *active again* here. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Markdown-2.5.1/tests/misc/nested-patterns.html new/Markdown-2.5.2/tests/misc/nested-patterns.html --- old/Markdown-2.5.1/tests/misc/nested-patterns.html 2013-03-08 04:04:29.000000000 +0100 +++ new/Markdown-2.5.2/tests/misc/nested-patterns.html 2014-11-18 05:32:47.000000000 +0100 @@ -4,4 +4,7 @@ <strong><a href="http://example.com"><em>link</em></a></strong> <strong><a href="http://example.com"><em>link</em></a></strong> <strong><a href="http://example.com"><em>link</em></a></strong> -<a href="http://example.com"><strong><em>link</em></strong></a></p> \ No newline at end of file +<a href="http://example.com"><strong><em>link</em></strong></a></p> +<p><strong><em>I am <strong><em>italic</em> and</strong> bold</em> I am <code>just</code> bold</strong></p> +<p>Example <strong><em>bold italic</em></strong> on the same line <strong><em>bold italic</em></strong>.</p> +<p>Example <strong><em>bold italic</em></strong> on the same line <strong><em>bold italic</em></strong>.</p> \ No newline at end of file diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Markdown-2.5.1/tests/misc/nested-patterns.txt new/Markdown-2.5.2/tests/misc/nested-patterns.txt --- old/Markdown-2.5.1/tests/misc/nested-patterns.txt 2013-03-08 04:04:29.000000000 +0100 +++ new/Markdown-2.5.2/tests/misc/nested-patterns.txt 2014-11-18 05:32:47.000000000 +0100 @@ -5,3 +5,9 @@ __[*link*](http://example.com)__ **[_link_](http://example.com)** [***link***](http://example.com) + +***I am ___italic_ and__ bold* I am `just` bold** + +Example __*bold italic*__ on the same line __*bold italic*__. + +Example **_bold italic_** on the same line **_bold italic_**. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Markdown-2.5.1/tests/test_extensions.py new/Markdown-2.5.2/tests/test_extensions.py --- old/Markdown-2.5.1/tests/test_extensions.py 2014-09-13 02:32:11.000000000 +0200 +++ new/Markdown-2.5.2/tests/test_extensions.py 2014-11-11 01:52:05.000000000 +0100 @@ -91,10 +91,8 @@ text = '\t# A Code Comment' md = markdown.Markdown(extensions=['markdown.extensions.codehilite']) if self.has_pygments: - self.assertEqual(md.convert(text), - '<div class="codehilite">' - '<pre><span class="c"># A Code Comment</span>\n' - '</pre></div>') + # Pygments can use random lexer here as we did not specify the language + self.assertTrue(md.convert(text).startswith('<div class="codehilite"><pre>')) else: self.assertEqual(md.convert(text), '<pre class="codehilite"><code># A Code Comment' @@ -105,7 +103,7 @@ md = markdown.Markdown( extensions=[markdown.extensions.codehilite.CodeHiliteExtension(linenums=True)]) if self.has_pygments: - # Differant versions of pygments output slightly different markup. + # Different versions of pygments output slightly different markup. # So we use 'startwith' and test just enough to confirm that # pygments received and processed linenums. self.assertTrue(md.convert(text).startswith( @@ -134,10 +132,8 @@ md = markdown.Markdown( extensions=[markdown.extensions.codehilite.CodeHiliteExtension(linenums=None)]) if self.has_pygments: - self.assertEqual(md.convert(text), - '<div class="codehilite">' - '<pre><span class="c"># A Code Comment</span>\n' - '</pre></div>') + # Pygments can use random lexer here as we did not specify the language + self.assertTrue(md.convert(text).startswith('<div class="codehilite"><pre>')) else: self.assertEqual(md.convert(text), '<pre class="codehilite"><code># A Code Comment' -- To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-commit+help@opensuse.org