Changelog History
Page 5
-
v1.0.1.2 Changes
- [Issue 8] Alleviate some of the incompat of the last change by allowing (at
the Python module level) the usage of
safe_mode=True
to mean what it used to -- i.e. "replace" safe mode. - [Issue 8, incompatible change] The "-s|--safe" command line option and the equivalent "safe_mode" option has changed semantics to be a string instead of a boolean. Legal values of the string are "replace" (the old behaviour: literal HTML is replaced with "[HTML_REMOVED]") and "escape" (meta chars in literal HTML is escaped).
- [Issue 11] Process markup in footnote definition bodies.
- Add support for
-*- markdown-extras: ... -*-
emacs-style files variables (typically in an XML comment) to set "extras" for the markdown conversion. - [Issue 6] Fix problem with footnotes if the reference string had uppercase letters.
- [Issue 8] Alleviate some of the incompat of the last change by allowing (at
the Python module level) the usage of
-
v1.0.1.19 Changes
- ๐ [Issue 66] Add "wiki-tables" extra for Google Code Wiki-style tables. See http://code.google.com/p/support/wiki/WikiSyntax#Tables.
-
v1.0.1.18 Changes
๐ [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 aNone
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 ofNone
as followsmarkdown(..., extras={'header-ids': True})
.None
is wanted, butTrue
is commonly (at least I did it twice) used.
-
v1.0.1.17 Changes
[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.
-
v1.0.1.16 Changes
[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>
-
v1.0.1.15 Changes
- [Issue 30] Fix a possible XSS via JavaScript injection in a carefully crafted image reference (usage of double-quotes in the URL).
-
v1.0.1.14 Changes
- ๐ [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).
-
v1.0.1.13 Changes
- [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.
-
v1.0.1.12 Changes
- [Issue 26] Fix bug where email auto linking wouldn't work for emails with
underscores. E.g.
Mail me: <[email protected]>
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'
- [Issue 26] Fix bug where email auto linking wouldn't work for emails with
underscores. E.g.
-
v1.0.1.11 Changes
- ๐ Fix syntax_color test for the latest Pygments.
- [Issue 20] Can't assume that
sys.argv
is defined at top-level code -- e.g. when used at a PostreSQL stored procedure. Fix that.