Markdown2

Latest version: v2.5.3

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

Scan your dependencies

Page 8 of 11

1.1.1

Not secure
- Drop "Makefile.py" (a `mk` thing) and simplify to "Makefile".

1.1.0

Not secure
- [issue 76] Ensure "smarty-pants" extra doesn't destroy image links
and links with title text.

- [issue 72] Support reading from stdin for command line tool like any
well-behaved unix tool, e.g.:

$ echo '*hi*' | markdown2
<p><em>hi</em></p>

Thanks Ryan!

- Drop this "1.0.1.*" version silliness. The idea *was* that the first three
numbers tracked the Markdown.pl on which markdown2.py was originally based.
I don't believe Markdown.pl really gets releases anymore tho, so pointless.

1.0.1.19

Not secure
- [Issue 66] Add "wiki-tables" extra for Google Code Wiki-style tables.
See <http://code.google.com/p/support/wiki/WikiSyntax#Tables>.

1.0.1.18

Not secure
- [Issue 57] Add html5 block tags (article, section, aside, et al; see
"_html5tags" variable) to Markdown literal HTML block tag handling. Thanks
Tim Gray!

- [Issue 56] Fix `setup.py install`.

- [Issue 54] Fix escaping of link title attributes. Thanks FND!

- Tweak list matching to NOT make a ul for something like this:

- - - - - hi there

Before this change this would be a silly 5-deep nested li. See
"not_quite_a_list" test case.

- [Issue 52] Fix potential pathologically slow matching for `<hr>` markdown
("slow_hr" test case).

- Add a `Markdown.postprocess(text) -> text` hook that is called near the end
of markdown conversion. By default this does no transformation. It is called
just before unescaping of special characters and unhashing of literal HTML
blocks.

- ["header-ids" and "toc" extras] Add "n" argument to
`Markdown.header_id_from_text` hook. This allows a subclass using this hook
to differentiate the header id based on the hN number (e.g. h1 diff that
h2). Also allow a `None` return value to not add an id to that header (and
exclude that header from the TOC).

Note: If you used this hook, this is an incompatible change to the call
signature.

- Add a "markdown-in-html" extra similar to (but limited)
<http://michelf.com/projects/php-markdown/extra/#markdown-attr>. I.e. this:

<div markdown="1">
Yo **yo**!
</div>

becomes:

<div>

Yo <strong>yo</strong>!

</div>

- [Issue 39] Test case fix for pygments 1.3.1 from thomas.moschny.

- [Issue 42] Add "smarty-pants" extra for transforming plain ASCII
punctuation characters into smart typographic punctuation HTML entities.
Inspiration: <http://daringfireball.net/projects/smartypants/>
Implementation by Nikhil Chelliah. Also add `\'` and `\"` escape sequences
for forcing dumb quotes when this extra is in use.

- Guard against using `True` instead of `None` as follows
`markdown(..., extras={'header-ids': True})`. `None` is wanted, but `True`
is commonly (at least I did it twice) used.

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>

Page 8 of 11

© 2025 Safety CLI Cybersecurity Inc. All Rights Reserved.