All Versions
48
Latest Version
Avg Release Cycle
208 days
Latest Release
-

Changelog History
Page 4

  • v1.0.1.7 Changes

    • ➕ Add a proper setup.py and release to pypi: http://pypi.python.org/pypi/markdown2/
    • 🚚 Move markdown2.py module to a lib subdir. This allows one to put the "lib" dir of a source checkout (e.g. via an svn:externals) on ones Python Path without have the .py files at the top-level getting in the way.
  • v1.0.1.6 Changes

    • 🛠 Fix Python 2.6 deprecation warning about the md5 module.
    • Pass XML processing instructions and one-liner tags. For example:

      <?blah ...?>
      <xi:include xmlns:xi="..." />
      

    Limitations: they must be on one line. Test: pi_and_xinclude. Suggested by Wolfgang Machert.

  • v1.0.1.5 Changes

    • ➕ Add ability for 'extras' to have arguments. Internally the 'extras' attribute of the Markdown class is a dict (it was a set).
    • ➕ Add "demote-headers" extra that will demote the markdown for, e.g., an h1 to h2-6 by the number of the demote-headers argument.

      >>> markdown('# this would be an h1', extras={'demote-headers': 2})
      u'<h3>this would be an h1</h3>\n'
      

    This can be useful for user-supplied Markdown content for a sub-section of a page.

  • v1.0.1.4 Changes

    • [Issue 18] Allow spaces in the URL for link definitions.
    • [Issue 15] Fix some edge cases with backslash-escapes.
    • 🛠 Fix this error that broken command-line usage:

      NameError: global name 'use_file_vars' is not defined
      
    • ➕ Add "pyshell" extra for auto-codeblock'ing Python interactive shell sessions even if they weren't properly indented by the tab width.

  • v1.0.1.3 Changes

    • Make the use of the -*- markdown-extras: ... -*- emacs-style files variable to set "extras" off be default. It can be turned on via --use-file-vars on the command line and use_file_vars=True via the module interface.
    • [Issue 3] Drop the code-color extra hack added for issue3 that was causing the a unicode error with unicode in a code-colored block, http://code.google.com/p/python-markdown2/issues/detail?id=3#c8
  • 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.
  • v1.0.1.19 Changes

  • 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 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.

    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.

  • 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>