diff -Nru python-markdown-3.3.4/debian/changelog python-markdown-3.3.6/debian/changelog --- python-markdown-3.3.4/debian/changelog 2021-02-25 11:37:43.000000000 +0000 +++ python-markdown-3.3.6/debian/changelog 2021-11-17 19:54:20.000000000 +0000 @@ -1,3 +1,15 @@ +python-markdown (3.3.6-1) unstable; urgency=medium + + * New upstream release. + * Build-depend and depend on python3-importlib-metadata ≥ 4.4. + * Remove python3-pkg-resources runtime dependency again. + /usr/bin/markdown_py script generated by setuptools ≥ 47.3 will try to + use importlib.metadata if it’s available. + * Bump Standards-Version to 4.6.0, no changes needed. + * Update debian/watch to version=4. + + -- Dmitry Shachnev Wed, 17 Nov 2021 22:54:20 +0300 + python-markdown (3.3.4-1) unstable; urgency=medium * New upstream release. diff -Nru python-markdown-3.3.4/debian/control python-markdown-3.3.6/debian/control --- python-markdown-3.3.4/debian/control 2021-02-25 11:37:43.000000000 +0000 +++ python-markdown-3.3.6/debian/control 2021-11-17 19:54:20.000000000 +0000 @@ -8,20 +8,23 @@ mkdocs (>= 1.0.4+dfsg-1~) , mkdocs-nature (>= 0.3.1) , python3-all (>= 3.1.2-7~), + python3-importlib-metadata (>= 4.4), python3-packaging, python3-pygments, - python3-setuptools, + python3-setuptools (>= 47.3), python3-tidylib, python3-yaml Rules-Requires-Root: no -Standards-Version: 4.5.1 +Standards-Version: 4.6.0 Homepage: https://github.com/Python-Markdown/markdown Vcs-Git: https://salsa.debian.org/python-team/packages/python-markdown.git Vcs-Browser: https://salsa.debian.org/python-team/packages/python-markdown Package: python3-markdown Architecture: all -Depends: python3-pkg-resources, ${misc:Depends}, ${python3:Depends} +Depends: python3-importlib-metadata (>= 4.4), + ${misc:Depends}, + ${python3:Depends} Recommends: python3-pygments, python3-yaml Suggests: python-markdown-doc Breaks: python-markdown (<< 3.1.1-4), python3-mdx-math (<< 0.7-2~) diff -Nru python-markdown-3.3.4/debian/copyright python-markdown-3.3.6/debian/copyright --- python-markdown-3.3.4/debian/copyright 2021-02-25 11:37:43.000000000 +0000 +++ python-markdown-3.3.6/debian/copyright 2021-11-17 19:54:20.000000000 +0000 @@ -5,7 +5,7 @@ Files: * Copyright: 2004 Manfred Stienstra 2004-2006 Yuri Takhteyev - 2007-2019 The Python Markdown Project + 2007-2021 The Python Markdown Project License: BSD-3-clause Files: markdown/extensions/* diff -Nru python-markdown-3.3.4/debian/watch python-markdown-3.3.6/debian/watch --- python-markdown-3.3.4/debian/watch 2021-02-25 11:37:43.000000000 +0000 +++ python-markdown-3.3.6/debian/watch 2021-11-17 19:54:20.000000000 +0000 @@ -1,2 +1,2 @@ -version=3 +version=4 https://pypi.debian.net/Markdown/Markdown-(.*)\.tar\.gz diff -Nru python-markdown-3.3.4/docs/change_log/index.md python-markdown-3.3.6/docs/change_log/index.md --- python-markdown-3.3.4/docs/change_log/index.md 2021-02-24 19:57:42.000000000 +0000 +++ python-markdown-3.3.6/docs/change_log/index.md 2021-11-17 15:59:35.000000000 +0000 @@ -3,6 +3,20 @@ Python-Markdown Change Log ========================= +Nov 17, 2021: version 3.3.6 (a bug-fix release). + +* Fix a dependency issue (#1195, #1196). + +Nov 16, 2021: version 3.3.5 (a bug-fix release). + +* Make the `slugify_unicode` function not remove diacritical marks (#1118). +* Fix `[toc]` detection when used with `nl2br` extension (#1160). +* Re-use compiled regex for block level checks (#1169). +* Don't process shebangs in fenced code blocks when using CodeHilite (#1156). +* Improve email address validation for Automatic Links (#1165). +* Ensure `` tags are parsed correctly (#1079). +* Support Python 3.10 (#1124). + Feb 24, 2021: version 3.3.4 (a bug-fix release). * Properly parse unclosed tags in code spans (#1066). @@ -10,7 +24,8 @@ * Properly parse code spans in md_in_html (#1069). * Preserve text immediately before an admonition (#1092). * Simplified regex for HTML placeholders (#928) addressing (#932). -* Ensure `permalinks` and `ankorlinks` are not restricted by `toc_depth` (#1107). +* Ensure `permalinks` and `anchorlinks` are not restricted by `toc_depth` (#1107). +* Fix corner cases with lists under admonitions (#1102). Oct 25, 2020: version 3.3.3 (a bug-fix release). diff -Nru python-markdown-3.3.4/docs/change_log/release-3.3.md python-markdown-3.3.6/docs/change_log/release-3.3.md --- python-markdown-3.3.4/docs/change_log/release-3.3.md 2021-02-24 19:57:42.000000000 +0000 +++ python-markdown-3.3.6/docs/change_log/release-3.3.md 2021-11-17 15:59:35.000000000 +0000 @@ -101,7 +101,6 @@ * Fix unescaping of HTML characters `<>` in CodeHilite (#990). * Fix complex scenarios involving lists and admonitions (#1004). * Fix complex scenarios with nested ordered and unordered lists in a definition list (#918). -* Fix corner cases with lists under admonitions. [spec]: https://www.w3.org/TR/html5/text-level-semantics.html#the-code-element [fenced_code]: ../extensions/fenced_code_blocks.md diff -Nru python-markdown-3.3.4/docs/extensions/api.md python-markdown-3.3.6/docs/extensions/api.md --- python-markdown-3.3.4/docs/extensions/api.md 2021-02-24 19:57:42.000000000 +0000 +++ python-markdown-3.3.6/docs/extensions/api.md 2021-11-17 15:59:35.000000000 +0000 @@ -868,7 +868,7 @@ [match object]: https://docs.python.org/3/library/re.html#match-objects [bug tracker]: https://github.com/Python-Markdown/markdown/issues [extension source]: https://github.com/Python-Markdown/markdown/tree/master/markdown/extensions -[tutorial]: https://github.com/Python-Markdown/markdown/wiki/Tutorial:-Writing-Extensions-for-Python-Markdown +[tutorial]: https://github.com/Python-Markdown/markdown/wiki/Tutorial-1---Writing-Extensions-for-Python-Markdown [workingwithetree]: #working_with_et [Integrating your code into Markdown]: #integrating_into_markdown [extendMarkdown]: #extendmarkdown diff -Nru python-markdown-3.3.4/docs/extensions/footnotes.md python-markdown-3.3.6/docs/extensions/footnotes.md --- python-markdown-3.3.4/docs/extensions/footnotes.md 2021-02-24 19:57:42.000000000 +0000 +++ python-markdown-3.3.6/docs/extensions/footnotes.md 2021-11-17 15:59:35.000000000 +0000 @@ -99,3 +99,31 @@ ```python markdown.markdown(some_text, extensions=['footnotes']) ``` + +Resetting Instance State +----- + +Footnote definitions are stored within the `markdown.Markdown` class instance between +multiple runs of the class. This allows footnotes from all runs to be included in +output, with links and references that are unique, even though the class has been +called multiple times. + +However, if needed, the definitions can be cleared between runs by calling `reset`. + +For instance, the home page of a blog might include the content from multiple documents. +By not calling `reset`, all of the footnotes will be rendered, and they will all have +unique links and references. + +On the other hand, individual blog post pages might need the content from only one +document, and should have footnotes pertaining only to that page. By calling `reset` +between runs, the footnote definitions from the first document will be cleared before +the second document is rendered. + +An example of calling `reset`: + +```python +md = markdown.Markdown(extensions=['footnotes']) +html1 = md.convert(text_with_footnote) +md.reset() +html2 = md.convert(text_without_footnote) +``` diff -Nru python-markdown-3.3.4/markdown/blockprocessors.py python-markdown-3.3.6/markdown/blockprocessors.py --- python-markdown-3.3.4/markdown/blockprocessors.py 2021-02-24 19:57:42.000000000 +0000 +++ python-markdown-3.3.6/markdown/blockprocessors.py 2021-11-17 15:59:35.000000000 +0000 @@ -559,7 +559,7 @@ class ReferenceProcessor(BlockProcessor): """ Process link references. """ RE = re.compile( - r'^[ ]{0,3}\[([^\]]*)\]:[ ]*\n?[ ]*([^\s]+)[ ]*\n?[ ]*((["\'])(.*)\4|\((.*)\))?[ ]*$', re.MULTILINE + r'^[ ]{0,3}\[([^\]]*)\]:[ ]*\n?[ ]*([^\s]+)[ ]*(?:\n[ ]*)?((["\'])(.*)\4[ ]*|\((.*)\)[ ]*)?$', re.MULTILINE ) def test(self, parent, block): diff -Nru python-markdown-3.3.4/markdown/core.py python-markdown-3.3.6/markdown/core.py --- python-markdown-3.3.4/markdown/core.py 2021-02-24 19:57:42.000000000 +0000 +++ python-markdown-3.3.6/markdown/core.py 2021-11-17 15:59:35.000000000 +0000 @@ -82,7 +82,7 @@ # Other elements which Markdown should not be mucking up the contents of. 'canvas', 'colgroup', 'dd', 'body', 'dt', 'group', 'iframe', 'li', 'legend', 'math', 'map', 'noscript', 'output', 'object', 'option', 'progress', 'script', - 'style', 'tbody', 'td', 'textarea', 'tfoot', 'th', 'thead', 'tr', 'video' + 'style', 'summary', 'tbody', 'td', 'textarea', 'tfoot', 'th', 'thead', 'tr', 'video' ] self.registeredExtensions = [] diff -Nru python-markdown-3.3.4/markdown/extensions/admonition.py python-markdown-3.3.6/markdown/extensions/admonition.py --- python-markdown-3.3.4/markdown/extensions/admonition.py 2021-02-24 19:57:42.000000000 +0000 +++ python-markdown-3.3.6/markdown/extensions/admonition.py 2021-11-17 15:59:35.000000000 +0000 @@ -49,9 +49,9 @@ self.content_indention = 0 def parse_content(self, parent, block): - """Get sibling admontion. + """Get sibling admonition. - Retrieve the appropriate siblimg element. This can get trickly when + Retrieve the appropriate sibling element. This can get tricky when dealing with lists. """ @@ -72,8 +72,8 @@ if sibling is None or sibling.get('class', '').find(self.CLASSNAME) == -1: sibling = None else: - # If the last child is a list and the content is idented sufficient - # to be under it, then the content's is sibling is in the list. + # If the last child is a list and the content is sufficiently indented + # to be under it, then the content's sibling is in the list. last_child = self.lastChild(sibling) indent = 0 while last_child: @@ -83,12 +83,12 @@ ): # The expectation is that we'll find an
  • or
    . - # We should get it's last child as well. + # We should get its last child as well. sibling = self.lastChild(last_child) last_child = self.lastChild(sibling) if sibling else None # Context has been lost at this point, so we must adjust the - # text's identation level so it will be evaluated correctly + # text's indentation level so it will be evaluated correctly # under the list. block = block[self.tab_length:] indent += self.tab_length diff -Nru python-markdown-3.3.4/markdown/extensions/codehilite.py python-markdown-3.3.6/markdown/extensions/codehilite.py --- python-markdown-3.3.4/markdown/extensions/codehilite.py 2021-02-24 19:57:42.000000000 +0000 +++ python-markdown-3.3.6/markdown/extensions/codehilite.py 2021-11-17 15:59:35.000000000 +0000 @@ -112,7 +112,7 @@ self.options = options - def hilite(self): + def hilite(self, shebang=True): """ Pass code to the [Pygments](http://pygments.pocoo.org/) highliter with optional line numbers. The output should then be styled with css to @@ -125,7 +125,7 @@ self.src = self.src.strip('\n') - if self.lang is None: + if self.lang is None and shebang: self._parseHeader() if pygments and self.use_pygments: diff -Nru python-markdown-3.3.4/markdown/extensions/fenced_code.py python-markdown-3.3.6/markdown/extensions/fenced_code.py --- python-markdown-3.3.4/markdown/extensions/fenced_code.py 2021-02-24 19:57:42.000000000 +0000 +++ python-markdown-3.3.6/markdown/extensions/fenced_code.py 2021-11-17 15:59:35.000000000 +0000 @@ -42,13 +42,13 @@ class FencedBlockPreprocessor(Preprocessor): FENCED_BLOCK_RE = re.compile( dedent(r''' - (?P^(?:~{3,}|`{3,}))[ ]* # opening fence - ((\{(?P[^\}\n]*)\})?| # (optional {attrs} or - (\.?(?P[\w#.+-]*))?[ ]* # optional (.)lang - (hl_lines=(?P"|')(?P.*?)(?P=quot))?) # optional hl_lines) - [ ]*\n # newline (end of opening fence) - (?P.*?)(?<=\n) # the code block - (?P=fence)[ ]*$ # closing fence + (?P^(?:~{3,}|`{3,}))[ ]* # opening fence + ((\{(?P[^\}\n]*)\})| # (optional {attrs} or + (\.?(?P[\w#.+-]*)[ ]*)? # optional (.)lang + (hl_lines=(?P"|')(?P.*?)(?P=quot)[ ]*)?) # optional hl_lines) + \n # newline (end of opening fence) + (?P.*?)(?<=\n) # the code block + (?P=fence)[ ]*$ # closing fence '''), re.MULTILINE | re.DOTALL | re.VERBOSE ) @@ -116,7 +116,7 @@ **local_config ) - code = highliter.hilite() + code = highliter.hilite(shebang=False) else: id_attr = lang_attr = class_attr = kv_pairs = '' if lang: diff -Nru python-markdown-3.3.4/markdown/extensions/md_in_html.py python-markdown-3.3.6/markdown/extensions/md_in_html.py --- python-markdown-3.3.4/markdown/extensions/md_in_html.py 2021-02-24 19:57:42.000000000 +0000 +++ python-markdown-3.3.6/markdown/extensions/md_in_html.py 2021-11-17 15:59:35.000000000 +0000 @@ -33,13 +33,14 @@ self.block_level_tags = set(md.block_level_elements.copy()) # Block-level tags in which the content only gets span level parsing self.span_tags = set( - ['address', 'dd', 'dt', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'legend', 'li', 'p', 'td', 'th'] + ['address', 'dd', 'dt', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'legend', 'li', 'p', 'summary', 'td', 'th'] ) # Block-level tags which never get their content parsed. self.raw_tags = set(['canvas', 'math', 'option', 'pre', 'script', 'style', 'textarea']) - # Block-level tags in which the content gets parsed as blocks + super().__init__(md, *args, **kwargs) + # Block-level tags in which the content gets parsed as blocks self.block_tags = set(self.block_level_tags) - (self.span_tags | self.raw_tags | self.empty_tags) self.span_and_blocks_tags = self.block_tags | self.span_tags diff -Nru python-markdown-3.3.4/markdown/extensions/toc.py python-markdown-3.3.6/markdown/extensions/toc.py --- python-markdown-3.3.4/markdown/extensions/toc.py 2021-02-24 19:57:42.000000000 +0000 +++ python-markdown-3.3.6/markdown/extensions/toc.py 2021-11-17 15:59:35.000000000 +0000 @@ -23,16 +23,19 @@ import xml.etree.ElementTree as etree -def slugify(value, separator, encoding='ascii'): +def slugify(value, separator, unicode=False): """ Slugify a string, to make it URL friendly. """ - value = unicodedata.normalize('NFKD', value).encode(encoding, 'ignore') - value = re.sub(r'[^\w\s-]', '', value.decode(encoding)).strip().lower() + if not unicode: + # Replace Extended Latin characters with ASCII, i.e. žlutý → zluty + value = unicodedata.normalize('NFKD', value) + value = value.encode('ascii', 'ignore').decode('ascii') + value = re.sub(r'[^\w\s-]', '', value).strip().lower() return re.sub(r'[{}\s]+'.format(separator), separator, value) def slugify_unicode(value, separator): """ Slugify a string, to make it URL friendly while preserving Unicode characters. """ - return slugify(value, separator, 'utf-8') + return slugify(value, separator, unicode=True) IDCOUNT_RE = re.compile(r'^(.*)_([0-9]+)$') @@ -192,7 +195,12 @@ # To keep the output from screwing up the # validation by putting a
    inside of a

    # we actually replace the

    in its entirety. - if c.text and c.text.strip() == self.marker: + + # The

    element may contain more than a single text content + # (nl2br can introduce a
    ). In this situation, c.text returns + # the very first content, ignore children contents or tail content. + # len(c) == 0 is here to ensure there is only text in the

    . + if c.text and c.text.strip() == self.marker and len(c) == 0: for i in range(len(p)): if p[i] == c: p[i] = elem diff -Nru python-markdown-3.3.4/markdown/inlinepatterns.py python-markdown-3.3.6/markdown/inlinepatterns.py --- python-markdown-3.3.4/markdown/inlinepatterns.py 2021-02-24 19:57:42.000000000 +0000 +++ python-markdown-3.3.6/markdown/inlinepatterns.py 2021-11-17 15:59:35.000000000 +0000 @@ -160,10 +160,10 @@ AUTOLINK_RE = r'<((?:[Ff]|[Hh][Tt])[Tt][Pp][Ss]?://[^<>]*)>' # -AUTOMAIL_RE = r'<([^<> !]*@[^@<> ]*)>' +AUTOMAIL_RE = r'<([^<> !]+@[^@<> ]+)>' # <...> -HTML_RE = r'(<([a-zA-Z/][^<>]*|!--(?:(?!).)*--)>)' +HTML_RE = r'(<(\/?[a-zA-Z][^<>@ ]*( [^<>]*)?|!--(?:(?!).)*--)>)' # "&" (decimal) or "&" (hex) or "&" (named) ENTITY_RE = r'(&(?:\#[0-9]+|\#x[0-9a-fA-F]+|[a-zA-Z0-9]+);)' diff -Nru python-markdown-3.3.4/markdown/__main__.py python-markdown-3.3.6/markdown/__main__.py --- python-markdown-3.3.4/markdown/__main__.py 2021-02-24 19:57:42.000000000 +0000 +++ python-markdown-3.3.6/markdown/__main__.py 2021-11-17 15:59:35.000000000 +0000 @@ -70,7 +70,7 @@ parser.add_option("-c", "--extension_configs", dest="configfile", default=None, help="Read extension configurations from CONFIG_FILE. " - "CONFIG_FILE must be of JSON or YAML format. YAML" + "CONFIG_FILE must be of JSON or YAML format. YAML " "format requires that a python YAML library be " "installed. The parsed JSON or YAML must result in a " "python dictionary which would be accepted by the " diff -Nru python-markdown-3.3.4/markdown/__meta__.py python-markdown-3.3.6/markdown/__meta__.py --- python-markdown-3.3.4/markdown/__meta__.py 2021-02-24 19:57:42.000000000 +0000 +++ python-markdown-3.3.6/markdown/__meta__.py 2021-11-17 15:59:35.000000000 +0000 @@ -26,7 +26,7 @@ # (1, 2, 0, 'beta', 2) => "1.2b2" # (1, 2, 0, 'rc', 4) => "1.2rc4" # (1, 2, 0, 'final', 0) => "1.2" -__version_info__ = (3, 3, 4, 'final', 0) +__version_info__ = (3, 3, 6, 'final', 0) def _get_version(version_info): diff -Nru python-markdown-3.3.4/markdown/postprocessors.py python-markdown-3.3.6/markdown/postprocessors.py --- python-markdown-3.3.4/markdown/postprocessors.py 2021-02-24 19:57:42.000000000 +0000 +++ python-markdown-3.3.6/markdown/postprocessors.py 2021-11-17 15:59:35.000000000 +0000 @@ -65,6 +65,8 @@ class RawHtmlPostprocessor(Postprocessor): """ Restore raw html to the document. """ + BLOCK_LEVEL_REGEX = re.compile(r'^\<\/?([^ >]+)') + def run(self, text): """ Iterate over html stash and restore html. """ replacements = OrderedDict() @@ -99,7 +101,7 @@ return self.run(processed_text) def isblocklevel(self, html): - m = re.match(r'^\<\/?([^ >]+)', html) + m = self.BLOCK_LEVEL_REGEX.match(html) if m: if m.group(1)[0] in ('!', '?', '@', '%'): # Comment, php etc... diff -Nru python-markdown-3.3.4/markdown/util.py python-markdown-3.3.6/markdown/util.py --- python-markdown-3.3.4/markdown/util.py 2021-02-24 19:57:42.000000000 +0000 +++ python-markdown-3.3.6/markdown/util.py 2021-11-17 15:59:35.000000000 +0000 @@ -21,17 +21,18 @@ import re import sys -from collections import namedtuple -from functools import wraps import warnings import xml.etree.ElementTree -from .pep562 import Pep562 +from collections import namedtuple +from functools import wraps from itertools import count -try: +from .pep562 import Pep562 + +if sys.version_info >= (3, 10): from importlib import metadata -except ImportError: - # . - - [installation]: https://python-markdown.github.io/install/ - [usage]: https://python-markdown.github.io/reference/ - - See the change log at . - - Support - ------- - - You may report bugs, ask for help, and discuss various other issues on the [bug tracker][]. - - [bug tracker]: https://github.com/Python-Markdown/markdown/issues - - Code of Conduct - --------------- - - Everyone interacting in the Python-Markdown project's codebases, issue trackers, - and mailing lists is expected to follow the [Code of Conduct]. - Platform: UNKNOWN Classifier: Development Status :: 5 - Production/Stable Classifier: License :: OSI Approved :: BSD License @@ -87,6 +21,7 @@ Classifier: Programming Language :: Python :: 3.7 Classifier: Programming Language :: Python :: 3.8 Classifier: Programming Language :: Python :: 3.9 +Classifier: Programming Language :: Python :: 3.10 Classifier: Programming Language :: Python :: 3 :: Only Classifier: Programming Language :: Python :: Implementation :: CPython Classifier: Programming Language :: Python :: Implementation :: PyPy @@ -101,3 +36,72 @@ Requires-Python: >=3.6 Description-Content-Type: text/markdown Provides-Extra: testing +License-File: LICENSE.md + +[Python-Markdown][] +=================== + +[![Build Status][build-button]][build] +[![Coverage Status][codecov-button]][codecov] +[![Latest Version][mdversion-button]][md-pypi] +[![Python Versions][pyversion-button]][md-pypi] +[![BSD License][bsdlicense-button]][bsdlicense] +[![Code of Conduct][codeofconduct-button]][Code of Conduct] + +[build-button]: https://github.com/Python-Markdown/markdown/workflows/CI/badge.svg?event=push +[build]: https://github.com/Python-Markdown/markdown/actions?query=workflow%3ACI+event%3Apush +[codecov-button]: https://codecov.io/gh/Python-Markdown/markdown/branch/master/graph/badge.svg +[codecov]: https://codecov.io/gh/Python-Markdown/markdown +[mdversion-button]: https://img.shields.io/pypi/v/Markdown.svg +[md-pypi]: https://pypi.org/project/Markdown/ +[pyversion-button]: https://img.shields.io/pypi/pyversions/Markdown.svg +[bsdlicense-button]: https://img.shields.io/badge/license-BSD-yellow.svg +[bsdlicense]: https://opensource.org/licenses/BSD-3-Clause +[codeofconduct-button]: https://img.shields.io/badge/code%20of%20conduct-contributor%20covenant-green.svg?style=flat-square +[Code of Conduct]: https://github.com/Python-Markdown/markdown/blob/master/CODE_OF_CONDUCT.md + +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 +on what exactly is supported and what is not. Additional features are +supported by the [Available Extensions][]. + +[Python-Markdown]: https://Python-Markdown.github.io/ +[Markdown]: https://daringfireball.net/projects/markdown/ +[Features]: https://Python-Markdown.github.io#Features +[Available Extensions]: https://Python-Markdown.github.io/extensions + +Documentation +------------- + +```bash +pip install markdown +``` +```python +import markdown +html = markdown.markdown(your_text_string) +``` + +For more advanced [installation] and [usage] documentation, see the `docs/` directory +of the distribution or the project website at . + +[installation]: https://python-markdown.github.io/install/ +[usage]: https://python-markdown.github.io/reference/ + +See the change log at . + +Support +------- + +You may report bugs, ask for help, and discuss various other issues on the [bug tracker][]. + +[bug tracker]: https://github.com/Python-Markdown/markdown/issues + +Code of Conduct +--------------- + +Everyone interacting in the Python-Markdown project's codebases, issue trackers, +and mailing lists is expected to follow the [Code of Conduct]. + + + diff -Nru python-markdown-3.3.4/Markdown.egg-info/requires.txt python-markdown-3.3.6/Markdown.egg-info/requires.txt --- python-markdown-3.3.4/Markdown.egg-info/requires.txt 2021-02-24 19:57:45.000000000 +0000 +++ python-markdown-3.3.6/Markdown.egg-info/requires.txt 2021-11-17 15:59:40.000000000 +0000 @@ -1,6 +1,6 @@ -[:python_version < "3.8"] -importlib-metadata +[:python_version < "3.10"] +importlib-metadata>=4.4 [testing] coverage diff -Nru python-markdown-3.3.4/Markdown.egg-info/SOURCES.txt python-markdown-3.3.6/Markdown.egg-info/SOURCES.txt --- python-markdown-3.3.4/Markdown.egg-info/SOURCES.txt 2021-02-24 19:57:45.000000000 +0000 +++ python-markdown-3.3.6/Markdown.egg-info/SOURCES.txt 2021-11-17 15:59:40.000000000 +0000 @@ -374,6 +374,7 @@ tests/test_syntax/extensions/test_tables.py tests/test_syntax/extensions/test_toc.py tests/test_syntax/inline/__init__.py +tests/test_syntax/inline/test_autolinks.py tests/test_syntax/inline/test_emphasis.py tests/test_syntax/inline/test_entities.py tests/test_syntax/inline/test_images.py diff -Nru python-markdown-3.3.4/PKG-INFO python-markdown-3.3.6/PKG-INFO --- python-markdown-3.3.4/PKG-INFO 2021-02-24 19:57:45.000000000 +0000 +++ python-markdown-3.3.6/PKG-INFO 2021-11-17 15:59:40.000000000 +0000 @@ -1,6 +1,6 @@ Metadata-Version: 2.1 Name: Markdown -Version: 3.3.4 +Version: 3.3.6 Summary: Python implementation of Markdown. Home-page: https://Python-Markdown.github.io/ Author: Manfred Stienstra, Yuri takhteyev and Waylan limberg @@ -8,75 +8,9 @@ Maintainer: Waylan Limberg Maintainer-email: python.markdown@gmail.com License: BSD License -Download-URL: http://pypi.python.org/packages/source/M/Markdown/Markdown-3.3.4-py2.py3-none-any.whl Project-URL: Documentation, https://Python-Markdown.github.io/ Project-URL: GitHub Project, https://github.com/Python-Markdown/markdown Project-URL: Issue Tracker, https://github.com/Python-Markdown/markdown/issues -Description: [Python-Markdown][] - =================== - - [![Build Status][build-button]][build] - [![Coverage Status][codecov-button]][codecov] - [![Latest Version][mdversion-button]][md-pypi] - [![Python Versions][pyversion-button]][md-pypi] - [![BSD License][bsdlicense-button]][bsdlicense] - [![Code of Conduct][codeofconduct-button]][Code of Conduct] - - [build-button]: https://github.com/Python-Markdown/markdown/workflows/CI/badge.svg?event=push - [build]: https://github.com/Python-Markdown/markdown/actions?query=workflow%3ACI+event%3Apush - [codecov-button]: https://codecov.io/gh/Python-Markdown/markdown/branch/master/graph/badge.svg - [codecov]: https://codecov.io/gh/Python-Markdown/markdown - [mdversion-button]: https://img.shields.io/pypi/v/Markdown.svg - [md-pypi]: https://pypi.org/project/Markdown/ - [pyversion-button]: https://img.shields.io/pypi/pyversions/Markdown.svg - [bsdlicense-button]: https://img.shields.io/badge/license-BSD-yellow.svg - [bsdlicense]: https://opensource.org/licenses/BSD-3-Clause - [codeofconduct-button]: https://img.shields.io/badge/code%20of%20conduct-contributor%20covenant-green.svg?style=flat-square - [Code of Conduct]: https://github.com/Python-Markdown/markdown/blob/master/CODE_OF_CONDUCT.md - - 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 - on what exactly is supported and what is not. Additional features are - supported by the [Available Extensions][]. - - [Python-Markdown]: https://Python-Markdown.github.io/ - [Markdown]: https://daringfireball.net/projects/markdown/ - [Features]: https://Python-Markdown.github.io#Features - [Available Extensions]: https://Python-Markdown.github.io/extensions - - Documentation - ------------- - - ```bash - pip install markdown - ``` - ```python - import markdown - html = markdown.markdown(your_text_string) - ``` - - For more advanced [installation] and [usage] documentation, see the `docs/` directory - of the distribution or the project website at . - - [installation]: https://python-markdown.github.io/install/ - [usage]: https://python-markdown.github.io/reference/ - - See the change log at . - - Support - ------- - - You may report bugs, ask for help, and discuss various other issues on the [bug tracker][]. - - [bug tracker]: https://github.com/Python-Markdown/markdown/issues - - Code of Conduct - --------------- - - Everyone interacting in the Python-Markdown project's codebases, issue trackers, - and mailing lists is expected to follow the [Code of Conduct]. - Platform: UNKNOWN Classifier: Development Status :: 5 - Production/Stable Classifier: License :: OSI Approved :: BSD License @@ -87,6 +21,7 @@ Classifier: Programming Language :: Python :: 3.7 Classifier: Programming Language :: Python :: 3.8 Classifier: Programming Language :: Python :: 3.9 +Classifier: Programming Language :: Python :: 3.10 Classifier: Programming Language :: Python :: 3 :: Only Classifier: Programming Language :: Python :: Implementation :: CPython Classifier: Programming Language :: Python :: Implementation :: PyPy @@ -101,3 +36,72 @@ Requires-Python: >=3.6 Description-Content-Type: text/markdown Provides-Extra: testing +License-File: LICENSE.md + +[Python-Markdown][] +=================== + +[![Build Status][build-button]][build] +[![Coverage Status][codecov-button]][codecov] +[![Latest Version][mdversion-button]][md-pypi] +[![Python Versions][pyversion-button]][md-pypi] +[![BSD License][bsdlicense-button]][bsdlicense] +[![Code of Conduct][codeofconduct-button]][Code of Conduct] + +[build-button]: https://github.com/Python-Markdown/markdown/workflows/CI/badge.svg?event=push +[build]: https://github.com/Python-Markdown/markdown/actions?query=workflow%3ACI+event%3Apush +[codecov-button]: https://codecov.io/gh/Python-Markdown/markdown/branch/master/graph/badge.svg +[codecov]: https://codecov.io/gh/Python-Markdown/markdown +[mdversion-button]: https://img.shields.io/pypi/v/Markdown.svg +[md-pypi]: https://pypi.org/project/Markdown/ +[pyversion-button]: https://img.shields.io/pypi/pyversions/Markdown.svg +[bsdlicense-button]: https://img.shields.io/badge/license-BSD-yellow.svg +[bsdlicense]: https://opensource.org/licenses/BSD-3-Clause +[codeofconduct-button]: https://img.shields.io/badge/code%20of%20conduct-contributor%20covenant-green.svg?style=flat-square +[Code of Conduct]: https://github.com/Python-Markdown/markdown/blob/master/CODE_OF_CONDUCT.md + +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 +on what exactly is supported and what is not. Additional features are +supported by the [Available Extensions][]. + +[Python-Markdown]: https://Python-Markdown.github.io/ +[Markdown]: https://daringfireball.net/projects/markdown/ +[Features]: https://Python-Markdown.github.io#Features +[Available Extensions]: https://Python-Markdown.github.io/extensions + +Documentation +------------- + +```bash +pip install markdown +``` +```python +import markdown +html = markdown.markdown(your_text_string) +``` + +For more advanced [installation] and [usage] documentation, see the `docs/` directory +of the distribution or the project website at . + +[installation]: https://python-markdown.github.io/install/ +[usage]: https://python-markdown.github.io/reference/ + +See the change log at . + +Support +------- + +You may report bugs, ask for help, and discuss various other issues on the [bug tracker][]. + +[bug tracker]: https://github.com/Python-Markdown/markdown/issues + +Code of Conduct +--------------- + +Everyone interacting in the Python-Markdown project's codebases, issue trackers, +and mailing lists is expected to follow the [Code of Conduct]. + + + diff -Nru python-markdown-3.3.4/README.md python-markdown-3.3.6/README.md --- python-markdown-3.3.4/README.md 2021-02-24 19:57:42.000000000 +0000 +++ python-markdown-3.3.6/README.md 2021-11-17 15:59:35.000000000 +0000 @@ -62,3 +62,4 @@ Everyone interacting in the Python-Markdown project's codebases, issue trackers, and mailing lists is expected to follow the [Code of Conduct]. + diff -Nru python-markdown-3.3.4/setup.py python-markdown-3.3.6/setup.py --- python-markdown-3.3.4/setup.py 2021-02-24 19:57:42.000000000 +0000 +++ python-markdown-3.3.6/setup.py 2021-11-17 15:59:35.000000000 +0000 @@ -59,7 +59,6 @@ name='Markdown', version=__version__, url='https://Python-Markdown.github.io/', - download_url='http://pypi.python.org/packages/source/M/Markdown/Markdown-%s-py2.py3-none-any.whl' % __version__, project_urls={ 'Documentation': 'https://Python-Markdown.github.io/', 'GitHub Project': 'https://github.com/Python-Markdown/markdown', @@ -75,7 +74,7 @@ license='BSD License', packages=['markdown', 'markdown.extensions'], python_requires='>=3.6', - install_requires=["importlib-metadata;python_version<'3.8'"], + install_requires=["importlib-metadata>=4.4;python_version<'3.10'"], extras_require={ 'testing': [ 'coverage', @@ -118,6 +117,7 @@ 'Programming Language :: Python :: 3.7', 'Programming Language :: Python :: 3.8', 'Programming Language :: Python :: 3.9', + 'Programming Language :: Python :: 3.10', 'Programming Language :: Python :: 3 :: Only', 'Programming Language :: Python :: Implementation :: CPython', 'Programming Language :: Python :: Implementation :: PyPy', diff -Nru python-markdown-3.3.4/tests/test_syntax/extensions/test_fenced_code.py python-markdown-3.3.6/tests/test_syntax/extensions/test_fenced_code.py --- python-markdown-3.3.4/tests/test_syntax/extensions/test_fenced_code.py 2021-02-24 19:57:42.000000000 +0000 +++ python-markdown-3.3.6/tests/test_syntax/extensions/test_fenced_code.py 2021-11-17 15:59:35.000000000 +0000 @@ -381,6 +381,36 @@ if has_pygments and pygments.__version__ != required_pygments_version: self.skipTest(f'Pygments=={required_pygments_version} is required') + def test_shebang(self): + + if has_pygments: + expected = ''' +

    #!test
    +            
    + ''' + else: + expected = ''' +
    #!test
    +            
    + ''' + + self.assertMarkdownRenders( + self.dedent( + ''' + ``` + #!test + ``` + ''' + ), + self.dedent( + expected + ), + extensions=[ + markdown.extensions.codehilite.CodeHiliteExtension(linenums=None, guess_lang=False), + 'fenced_code' + ] + ) + def testFencedCodeWithHighlightLines(self): if has_pygments: expected = self.dedent( diff -Nru python-markdown-3.3.4/tests/test_syntax/extensions/test_md_in_html.py python-markdown-3.3.6/tests/test_syntax/extensions/test_md_in_html.py --- python-markdown-3.3.4/tests/test_syntax/extensions/test_md_in_html.py 2021-02-24 19:57:42.000000000 +0000 +++ python-markdown-3.3.6/tests/test_syntax/extensions/test_md_in_html.py 2021-11-17 15:59:35.000000000 +0000 @@ -283,6 +283,26 @@ ) ) + def text_md1_details(self): + self.assertMarkdownRenders( + self.dedent( + """ +
    + Click to expand + *foo* +
    + """ + ), + self.dedent( + """ +
    + Click to expand +

    foo

    +
    + """ + ) + ) + def test_md1_mix(self): self.assertMarkdownRenders( self.dedent( diff -Nru python-markdown-3.3.4/tests/test_syntax/extensions/test_toc.py python-markdown-3.3.6/tests/test_syntax/extensions/test_toc.py --- python-markdown-3.3.4/tests/test_syntax/extensions/test_toc.py 2021-02-24 19:57:42.000000000 +0000 +++ python-markdown-3.3.6/tests/test_syntax/extensions/test_toc.py 2021-11-17 15:59:35.000000000 +0000 @@ -21,6 +21,7 @@ from markdown.test_tools import TestCase from markdown.extensions.toc import TocExtension +from markdown.extensions.nl2br import Nl2BrExtension class TestTOC(TestCase): @@ -534,9 +535,9 @@ from markdown.extensions.toc import slugify_unicode self.assertMarkdownRenders( '# Unicode ヘッダー', - '

    ' # noqa + '

    ' # noqa 'Unicode ヘッダー' # noqa - '' # noqa + '' # noqa '

    ', # noqa extensions=[TocExtension(permalink=True, slugify=slugify_unicode)] ) @@ -545,9 +546,26 @@ from markdown.extensions.toc import slugify_unicode self.assertMarkdownRenders( '# Unicode ヘッダー', - '

    ' # noqa + '

    ' # noqa 'Unicode ヘッダー' # noqa - '' # noqa + '' # noqa '

    ', # noqa extensions=[TocExtension(permalink=True, permalink_title="パーマリンク", slugify=slugify_unicode)] ) + + def testPermalinkWithExtendedLatinInID(self): + self.assertMarkdownRenders( + '# Théâtre', + '

    ' # noqa + 'Théâtre' # noqa + '' # noqa + '

    ', # noqa + extensions=[TocExtension(permalink=True)] + ) + + def testNl2brCompatibility(self): + self.assertMarkdownRenders( + '[TOC]\ntext', + '

    [TOC]
    \ntext

    ', + extensions=[TocExtension(), Nl2BrExtension()] + ) diff -Nru python-markdown-3.3.4/tests/test_syntax/inline/test_autolinks.py python-markdown-3.3.6/tests/test_syntax/inline/test_autolinks.py --- python-markdown-3.3.4/tests/test_syntax/inline/test_autolinks.py 1970-01-01 00:00:00.000000000 +0000 +++ python-markdown-3.3.6/tests/test_syntax/inline/test_autolinks.py 2021-11-17 15:59:35.000000000 +0000 @@ -0,0 +1,63 @@ +""" +Python Markdown + +A Python implementation of John Gruber's Markdown. + +Documentation: https://python-markdown.github.io/ +GitHub: https://github.com/Python-Markdown/markdown/ +PyPI: https://pypi.org/project/Markdown/ + +Started by Manfred Stienstra (http://www.dwerg.net/). +Maintained for a few years by Yuri Takhteyev (http://www.freewisdom.org). +Currently maintained by Waylan Limberg (https://github.com/waylan), +Dmitry Shachnev (https://github.com/mitya57) and Isaac Muse (https://github.com/facelessuser). + +Copyright 2007-2021 The Python Markdown Project (v. 1.7 and later) +Copyright 2004, 2005, 2006 Yuri Takhteyev (v. 0.2-1.6b) +Copyright 2004 Manfred Stienstra (the original version) + +License: BSD (see LICENSE.md for details). +""" + +from markdown.test_tools import TestCase + + +class TestAutomaticLinks(TestCase): + + def test_email_address(self): + self.assertMarkdownRenders( + 'asdfasdfadsfasd or you can say ', + '

    asdfasdfadsfasd yuri@freewisd' + 'om.org or you can say

    ' + ) + + def test_mailto_email_address(self): + self.assertMarkdownRenders( + 'instead ', + '

    instead ' + 'yuri@freewisdom' + '.org

    ' + ) + + def test_email_address_with_ampersand(self): + self.assertMarkdownRenders( + '', + '

    bob&' + 'sue@example.com

    ' + ) + + def test_invalid_email_address_local_part(self): + self.assertMarkdownRenders( + 'Missing local-part <@domain>', + '

    Missing local-part <@domain>

    ' + ) + + def test_invalid_email_address_domain(self): + self.assertMarkdownRenders( + 'Missing domain ', + '

    Missing domain <local-part@>

    ' + )