Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package python-markdown2 for openSUSE:Factory checked in at 2023-12-21 23:38:32 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-markdown2 (Old) and /work/SRC/openSUSE:Factory/.python-markdown2.new.1840 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-markdown2" Thu Dec 21 23:38:32 2023 rev:13 rq:1134336 version:2.4.12 Changes: -------- --- /work/SRC/openSUSE:Factory/python-markdown2/python-markdown2.changes 2023-12-08 22:32:47.421626782 +0100 +++ /work/SRC/openSUSE:Factory/.python-markdown2.new.1840/python-markdown2.changes 2023-12-21 23:38:44.726826555 +0100 @@ -1,0 +2,12 @@ +Wed Dec 20 21:54:47 UTC 2023 - Dirk Müller <dmuel...@suse.com> + +- update to 2.4.12: + * Update `markdown-in-html` extra to handle markdown on same + line as HTML (#546) + * Fix tables with trailing whitespace not being recognized + * Fix multiple instances of strong emphasis (`**`) + in one line (#541) + * Fix incorrect parsing of links after square + brackets (#552) + +------------------------------------------------------------------- Old: ---- markdown2-2.4.11.tar.gz New: ---- markdown2-2.4.12.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-markdown2.spec ++++++ --- /var/tmp/diff_new_pack.8BZjfQ/_old 2023-12-21 23:38:45.378850333 +0100 +++ /var/tmp/diff_new_pack.8BZjfQ/_new 2023-12-21 23:38:45.382850479 +0100 @@ -18,7 +18,7 @@ %{?!python_module:%define python_module() python-%{**} python3-%{**}} Name: python-markdown2 -Version: 2.4.11 +Version: 2.4.12 Release: 0 Summary: A Python implementation of Markdown License: MIT ++++++ markdown2-2.4.11.tar.gz -> markdown2-2.4.12.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/markdown2-2.4.11/CHANGES.md new/markdown2-2.4.12/CHANGES.md --- old/markdown2-2.4.11/CHANGES.md 2023-12-03 19:51:54.000000000 +0100 +++ new/markdown2-2.4.12/CHANGES.md 2023-12-17 22:56:51.000000000 +0100 @@ -1,5 +1,12 @@ # python-markdown2 Changelog +## python-markdown2 2.4.12 + +- [pull #547] Update `markdown-in-html` extra to handle markdown on same line as HTML (#546) +- [pull #550] Fix tables with trailing whitespace not being recognized (#549) +- [pull #545] Fix multiple instances of strong emphasis (`**`) in one line (#541) +- [pull #556] Fix incorrect parsing of links after square brackets (#552) + ## python-markdown2 2.4.11 - [pull #524] Fix angles being escaped in style blocks (issue #523) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/markdown2-2.4.11/PKG-INFO new/markdown2-2.4.12/PKG-INFO --- old/markdown2-2.4.11/PKG-INFO 2023-12-03 19:51:58.228002500 +0100 +++ new/markdown2-2.4.12/PKG-INFO 2023-12-17 22:56:54.585874000 +0100 @@ -1,6 +1,6 @@ Metadata-Version: 2.1 Name: markdown2 -Version: 2.4.11 +Version: 2.4.12 Summary: A fast and complete Python implementation of Markdown Home-page: https://github.com/trentm/python-markdown2 Author: Trent Mick @@ -37,5 +37,5 @@ Classifier: Topic :: Text Processing :: Markup :: HTML Requires-Python: >=3.5, <4 Provides-Extra: all -Provides-Extra: code_syntax_highlighting Provides-Extra: wavedrom +Provides-Extra: code_syntax_highlighting diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/markdown2-2.4.11/lib/markdown2.egg-info/PKG-INFO new/markdown2-2.4.12/lib/markdown2.egg-info/PKG-INFO --- old/markdown2-2.4.11/lib/markdown2.egg-info/PKG-INFO 2023-12-03 19:51:58.000000000 +0100 +++ new/markdown2-2.4.12/lib/markdown2.egg-info/PKG-INFO 2023-12-17 22:56:54.000000000 +0100 @@ -1,6 +1,6 @@ Metadata-Version: 2.1 Name: markdown2 -Version: 2.4.11 +Version: 2.4.12 Summary: A fast and complete Python implementation of Markdown Home-page: https://github.com/trentm/python-markdown2 Author: Trent Mick @@ -37,5 +37,5 @@ Classifier: Topic :: Text Processing :: Markup :: HTML Requires-Python: >=3.5, <4 Provides-Extra: all -Provides-Extra: code_syntax_highlighting Provides-Extra: wavedrom +Provides-Extra: code_syntax_highlighting diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/markdown2-2.4.11/lib/markdown2.egg-info/SOURCES.txt new/markdown2-2.4.12/lib/markdown2.egg-info/SOURCES.txt --- old/markdown2-2.4.11/lib/markdown2.egg-info/SOURCES.txt 2023-12-03 19:51:58.000000000 +0100 +++ new/markdown2-2.4.12/lib/markdown2.egg-info/SOURCES.txt 2023-12-17 22:56:54.000000000 +0100 @@ -94,6 +94,8 @@ test/tm-cases/codespans_safe_mode.text test/tm-cases/consecutive_image_links_issue498.html test/tm-cases/consecutive_image_links_issue498.text +test/tm-cases/consecutive_strong_em.html +test/tm-cases/consecutive_strong_em.text test/tm-cases/cuddled_list_indented.html test/tm-cases/cuddled_list_indented.opts test/tm-cases/cuddled_list_indented.tags @@ -329,6 +331,8 @@ test/tm-cases/issue54_escape_link_title.html test/tm-cases/issue54_escape_link_title.tags test/tm-cases/issue54_escape_link_title.text +test/tm-cases/link_after_square_brackets.html +test/tm-cases/link_after_square_brackets.text test/tm-cases/link_defn_alt_title_delims.html test/tm-cases/link_defn_alt_title_delims.text test/tm-cases/link_defn_spaces_in_url.html @@ -388,6 +392,9 @@ test/tm-cases/markdown_in_html_in_lists.html test/tm-cases/markdown_in_html_in_lists.opts test/tm-cases/markdown_in_html_in_lists.text +test/tm-cases/markdown_in_html_on_same_line.html +test/tm-cases/markdown_in_html_on_same_line.opts +test/tm-cases/markdown_in_html_on_same_line.text test/tm-cases/mermaid.html test/tm-cases/mermaid.opts test/tm-cases/mermaid.tags @@ -524,6 +531,9 @@ test/tm-cases/toc_duplicate_entries.html test/tm-cases/toc_duplicate_entries.opts test/tm-cases/toc_duplicate_entries.text +test/tm-cases/trailing_table_whitespace.html +test/tm-cases/trailing_table_whitespace.opts +test/tm-cases/trailing_table_whitespace.text test/tm-cases/tricky_anchors.html test/tm-cases/tricky_anchors.text test/tm-cases/two_comments.html diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/markdown2-2.4.11/lib/markdown2.py new/markdown2-2.4.12/lib/markdown2.py --- old/markdown2-2.4.11/lib/markdown2.py 2023-12-03 19:50:40.000000000 +0100 +++ new/markdown2-2.4.12/lib/markdown2.py 2023-12-17 22:55:49.000000000 +0100 @@ -106,7 +106,7 @@ # not yet sure if there implications with this. Compare 'pydoc sre' # and 'perldoc perlre'. -__version_info__ = (2, 4, 11) +__version_info__ = (2, 4, 12) __version__ = '.'.join(map(str, __version_info__)) __author__ = "Trent Mick" @@ -783,8 +783,15 @@ def _hash_html_block_sub(self, match, raw=False): if isinstance(match, str): html = match + tag = None else: html = match.group(1) + try: + tag = match.group(2) + except IndexError: + tag = None + + tag = tag or re.match(r'^<(\S).*?>', html).group(1) if raw and self.safe_mode: html = self._sanitize_html(html) @@ -793,6 +800,10 @@ m = self._html_markdown_attr_re.search(first_line) if m: lines = html.split('\n') + if len(lines) < 3: # if MD is on same line as HTML + lines = re.split(r'(<%s.*markdown=.*?>)' % tag, lines[0])[1:] + lines[1:] + first_line = lines[0] + lines = lines[:-1] + re.split(r'(</%s>.*?$)' % tag, lines[-1])[:-1] middle = '\n'.join(lines[1:-1]) last_line = lines[-1] first_line = first_line[:m.start()] + first_line[m.end():] @@ -1241,21 +1252,21 @@ (?:(?<=\n\n)|\A\n?) # leading blank line ^[ ]{0,%d} # allowed whitespace - (.*[|].*) \n # $1: header row (at least one pipe) + (.*[|].*)[ ]*\n # $1: header row (at least one pipe) ^[ ]{0,%d} # allowed whitespace ( # $2: underline row # underline row with leading bar - (?: \|\ *:?-+:?\ * )+ \|? \s? \n + (?: \|\ *:?-+:?\ * )+ \|? \s?[ ]*\n | # or, underline row without leading bar - (?: \ *:?-+:?\ *\| )+ (?: \ *:?-+:?\ * )? \s? \n + (?: \ *:?-+:?\ *\| )+ (?: \ *:?-+:?\ * )? \s?[ ]*\n ) ( # $3: data rows (?: ^[ ]{0,%d}(?!\ ) # ensure line begins with 0 to less_than_tab spaces - .*\|.* \n + .*\|.*[ ]*\n )+ ) ''' % (less_than_tab, less_than_tab, less_than_tab), re.M | re.X) @@ -1775,7 +1786,8 @@ curr_pos = start_idx + 1 else: # This id isn't defined, leave the markup alone. - curr_pos = match.end() + # set current pos to end of link title and continue from there + curr_pos = p continue # Otherwise, it isn't markup. @@ -2395,9 +2407,9 @@ text = self._tg_spoiler_re.sub(r"<tg-spoiler>\1</tg-spoiler>", text) return text - _strong_re = re.compile(r"(\*\*|__)(?=\S)(.*\S)\1", re.S) + _strong_re = re.compile(r"(\*\*|__)(?=\S)(.+?[*_]?)(?<=\S)\1", re.S) _em_re = r"(\*|_)(?=\S)(.*?\S)\1" - _code_friendly_strong_re = re.compile(r"\*\*(?=\S)(.*\S)\*\*", re.S) + _code_friendly_strong_re = re.compile(r"\*\*(?=\S)(.+?[*_]?)(?<=\S)\*\*", re.S) _code_friendly_em_re = r"\*(?=\S)(.+?)\*" def _do_italics_and_bold(self, text): if self.extras.get('middle-word-em', True) is False: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/markdown2-2.4.11/test/test_markdown2.py new/markdown2-2.4.12/test/test_markdown2.py --- old/markdown2-2.4.11/test/test_markdown2.py 2023-02-12 23:32:18.000000000 +0100 +++ new/markdown2-2.4.12/test/test_markdown2.py 2023-12-17 22:55:49.000000000 +0100 @@ -345,8 +345,7 @@ html = html.decode('utf-8') html = _markdown_email_link_re.sub( _markdown_email_link_sub, html) - if sys.platform == "win32": - html = html.replace('\r\n', '\n') + html = html.replace('\r\n', '\n') return html diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/markdown2-2.4.11/test/testall.py new/markdown2-2.4.12/test/testall.py --- old/markdown2-2.4.11/test/testall.py 2023-06-22 23:16:13.000000000 +0200 +++ new/markdown2-2.4.12/test/testall.py 2023-12-17 22:55:49.000000000 +0100 @@ -23,6 +23,9 @@ def _gen_python_names(): yield "python" + if sys.platform == "win32": + return + # generate version numbers from python 3.5 to 3.20 for ver in [(3, i) for i in range(5, 20)]: yield "python%d.%d" % ver @@ -33,6 +36,10 @@ python_from_ver = {} for name in _gen_python_names(): for python in which.whichall(name): + if sys.platform == "win32" and re.search(r"\\WindowsApps\\[^\\]+$", python, flags=re.IGNORECASE): + # skip Python stubs from the Windows Store. + continue + ver = _python_ver_from_python(python) if ver not in python_from_ver: python_from_ver[ver] = python @@ -49,9 +56,11 @@ print("-- test with Python %s (%s)" % (ver_str, python)) assert ' ' not in python + env_args = 'MACOSX_DEPLOYMENT_TARGET= ' if sys.platform == 'darwin' else '' + proc = subprocess.Popen( # pass "-u" option to force unbuffered output - "MACOSX_DEPLOYMENT_TARGET= %s -u test.py -- -knownfailure" % python, + "%s%s -u test.py -- -knownfailure" % (env_args, python), shell=True, stderr=subprocess.PIPE ) @@ -64,7 +73,7 @@ all_warnings.append((python, ver_str, line)) if proc.returncode: - sys.exit(os.WEXITSTATUS(proc.returncode)) + sys.exit(proc.returncode) for python, ver_str, warning in all_warnings: # now re-print all warnings to make sure they are seen diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/markdown2-2.4.11/test/tm-cases/consecutive_strong_em.html new/markdown2-2.4.12/test/tm-cases/consecutive_strong_em.html --- old/markdown2-2.4.11/test/tm-cases/consecutive_strong_em.html 1970-01-01 01:00:00.000000000 +0100 +++ new/markdown2-2.4.12/test/tm-cases/consecutive_strong_em.html 2023-12-17 22:55:49.000000000 +0100 @@ -0,0 +1,7 @@ +<p><strong>a</strong> b <strong>c</strong></p> + +<p><em>a</em> b <em>c</em></p> + +<p><strong>a</strong> b <strong>c</strong></p> + +<p><em>a</em> b <em>c</em></p> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/markdown2-2.4.11/test/tm-cases/consecutive_strong_em.text new/markdown2-2.4.12/test/tm-cases/consecutive_strong_em.text --- old/markdown2-2.4.11/test/tm-cases/consecutive_strong_em.text 1970-01-01 01:00:00.000000000 +0100 +++ new/markdown2-2.4.12/test/tm-cases/consecutive_strong_em.text 2023-12-17 22:55:49.000000000 +0100 @@ -0,0 +1,7 @@ +**a** b **c** + +*a* b *c* + +__a__ b __c__ + +_a_ b _c_ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/markdown2-2.4.11/test/tm-cases/link_after_square_brackets.html new/markdown2-2.4.12/test/tm-cases/link_after_square_brackets.html --- old/markdown2-2.4.11/test/tm-cases/link_after_square_brackets.html 1970-01-01 01:00:00.000000000 +0100 +++ new/markdown2-2.4.12/test/tm-cases/link_after_square_brackets.html 2023-12-17 22:55:49.000000000 +0100 @@ -0,0 +1,3 @@ +<p>[before] +<a href="https://google.com">Some link</a> +[after]</p> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/markdown2-2.4.11/test/tm-cases/link_after_square_brackets.text new/markdown2-2.4.12/test/tm-cases/link_after_square_brackets.text --- old/markdown2-2.4.11/test/tm-cases/link_after_square_brackets.text 1970-01-01 01:00:00.000000000 +0100 +++ new/markdown2-2.4.12/test/tm-cases/link_after_square_brackets.text 2023-12-17 22:55:49.000000000 +0100 @@ -0,0 +1,3 @@ +[before] +[Some link](https://google.com) +[after] diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/markdown2-2.4.11/test/tm-cases/markdown_in_html_on_same_line.html new/markdown2-2.4.12/test/tm-cases/markdown_in_html_on_same_line.html --- old/markdown2-2.4.11/test/tm-cases/markdown_in_html_on_same_line.html 1970-01-01 01:00:00.000000000 +0100 +++ new/markdown2-2.4.12/test/tm-cases/markdown_in_html_on_same_line.html 2023-12-17 22:55:49.000000000 +0100 @@ -0,0 +1,23 @@ +<p> + +<p><strong>text</strong></p> + +</p> + +<p> + +<p><strong>text</strong></p> + +</p> + +<p> + +<p><strong>text</strong></p> + +</p> + +<p> + +<p><strong>text</strong></p> + +</p> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/markdown2-2.4.11/test/tm-cases/markdown_in_html_on_same_line.opts new/markdown2-2.4.12/test/tm-cases/markdown_in_html_on_same_line.opts --- old/markdown2-2.4.11/test/tm-cases/markdown_in_html_on_same_line.opts 1970-01-01 01:00:00.000000000 +0100 +++ new/markdown2-2.4.12/test/tm-cases/markdown_in_html_on_same_line.opts 2023-12-17 22:55:49.000000000 +0100 @@ -0,0 +1 @@ +{"extras": ["markdown-in-html"]} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/markdown2-2.4.11/test/tm-cases/markdown_in_html_on_same_line.text new/markdown2-2.4.12/test/tm-cases/markdown_in_html_on_same_line.text --- old/markdown2-2.4.11/test/tm-cases/markdown_in_html_on_same_line.text 1970-01-01 01:00:00.000000000 +0100 +++ new/markdown2-2.4.12/test/tm-cases/markdown_in_html_on_same_line.text 2023-12-17 22:55:49.000000000 +0100 @@ -0,0 +1,12 @@ +<p markdown="1">**text**</p> + + +<p markdown="1"> +**text**</p> + +<p markdown="1">**text** +</p> + +<p markdown="1"> +**text** +</p> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/markdown2-2.4.11/test/tm-cases/trailing_table_whitespace.html new/markdown2-2.4.12/test/tm-cases/trailing_table_whitespace.html --- old/markdown2-2.4.11/test/tm-cases/trailing_table_whitespace.html 1970-01-01 01:00:00.000000000 +0100 +++ new/markdown2-2.4.12/test/tm-cases/trailing_table_whitespace.html 2023-12-17 22:55:49.000000000 +0100 @@ -0,0 +1,22 @@ +<table> +<thead> +<tr> + <th>Pros</th> + <th>Cons</th> +</tr> +</thead> +<tbody> +<tr> + <td>Unique and refreshing take on the genre</td> + <td>May not resonate with all viewers</td> +</tr> +<tr> + <td>Cult classic status</td> + <td>Over-the-top humor may polarize audiences</td> +</tr> +<tr> + <td>Influential in launching careers</td> + <td>Niche appeal among comedy aficionados</td> +</tr> +</tbody> +</table> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/markdown2-2.4.11/test/tm-cases/trailing_table_whitespace.opts new/markdown2-2.4.12/test/tm-cases/trailing_table_whitespace.opts --- old/markdown2-2.4.11/test/tm-cases/trailing_table_whitespace.opts 1970-01-01 01:00:00.000000000 +0100 +++ new/markdown2-2.4.12/test/tm-cases/trailing_table_whitespace.opts 2023-12-17 22:55:49.000000000 +0100 @@ -0,0 +1 @@ +{"extras": ["tables"]} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/markdown2-2.4.11/test/tm-cases/trailing_table_whitespace.text new/markdown2-2.4.12/test/tm-cases/trailing_table_whitespace.text --- old/markdown2-2.4.11/test/tm-cases/trailing_table_whitespace.text 1970-01-01 01:00:00.000000000 +0100 +++ new/markdown2-2.4.12/test/tm-cases/trailing_table_whitespace.text 2023-12-17 22:55:49.000000000 +0100 @@ -0,0 +1,5 @@ +| Pros | Cons | +|-----------------------------------------|------------------------------------------------| +| Unique and refreshing take on the genre | May not resonate with all viewers | +| Cult classic status | Over-the-top humor may polarize audiences | +| Influential in launching careers | Niche appeal among comedy aficionados |