Markdown2

Latest version: v2.4.13

Safety actively analyzes 628924 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 8 of 10

1.0.1.17

Not secure
- [Issue 36] Fix "cuddled-lists" extra handling for an
looks-like-a-cuddled-list-but-is-indented block. See the
"test/tm-cases/cuddled_list_indented.text" test case.

- Experimental new "toc" extra. The returned string from conversion will have
a `toc_html` attribute.

- New "header-ids" extra that will add an `id` attribute to headers:

My First Section

will become:

<h1 id="my-first-section">My First Section</h1>

An argument can be give for the extra, which will be used as a prefix for
the ids:

$ cat foo.txt
hi there
$ python markdown2.py foo.txt
<h1>hi there</h1>
$ python markdown2.py foo.txt -x header-ids
<h1 id="hi-there">hi there</h1>
$ python markdown2.py foo.txt -x header-ids=prefix
<h1 id="prefix-hi-there">hi there</h1>

- Preliminary support for "html-classes" extra: takes a dict mapping HTML tag
to the string value to use for a "class" attribute for that emitted tag.
Currently just supports "pre" and "code" for code *blocks*.

1.0.1.16

Not secure
- [Issue 33] Implement a "cuddled-lists" extra that allows:

I did these things:
* bullet1
* bullet2
* bullet3

to be converted to:

<p>I did these things:</p>

<ul>
<li>bullet1</li>
<li>bullet2</li>
<li>bullet3</li>
</ul>

1.0.1.15

Not secure
- [Issue 30] Fix a possible XSS via JavaScript injection in a carefully
crafted image reference (usage of double-quotes in the URL).

1.0.1.14

Not secure
- [Issue 29] Fix security hole in the md5-hashing scheme for handling HTML
chunks during processing.
- [Issue 27] Fix problem with underscores in footnotes content (with
"footnotes" extra).

1.0.1.13

Not secure
- [Issue 24] Set really long sentinel for max-length of link text to avoid
problems with reasonably long ones.
- [Issue 26] Complete the fix for this issue. Before this change the
randomized obscuring of 'mailto:' link letters would sometimes result
in emails with underscores getting misinterpreted as for italics.

1.0.1.12

Not secure
- [Issue 26] Fix bug where email auto linking wouldn't work for emails with
underscores. E.g. `Mail me: <foo_barexample.com>` wouldn't work.
- Update MANIFEST.in to ensure bin/markdown2 gets included in sdist.
- [Issue 23] Add support for passing options to pygments for the "code-color"
extra. For example:

>>> markdown("...", extras={'code-color': {"noclasses": True}})

This `formatter_opts` dict is passed to the pygments HtmlCodeFormatter.
Patch from 'svetlyak.40wt'.
- [Issue 21] Escape naked '>' characters, as is already done for '&' and '<'
characters. Note that other markdown implementations (both Perl and PHP) do
*not* do this. This results in differing output with two 3rd-party tests:
"php-markdown-cases/Backslash escapes.text" and "markdowntest-cases/Amps
and angle encoding.tags".
- "link-patterns" extra: Add support for the href replacement being a
callable, e.g.:

>>> link_patterns = [
... (re.compile("PEP\s+(\d+)", re.I),
... lambda m: "http://www.python.org/dev/peps/pep-%04d/" % int(m.group(1))),
... ]
>>> markdown2.markdown("Here is PEP 42.", extras=["link-patterns"],
... link_patterns=link_patterns)
u'<p>Here is <a href="http://www.python.org/dev/peps/pep-0042/">PEP 42</a>.</p>\n'

Page 8 of 10

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.