1Python-Markdown 2.0 Release Notes 2================================= 3 4We are happy to release Python-Markdown 2.0, which has been over a year in the 5making. We have rewritten significant portions of the code, dramatically 6extending the extension API, increased performance, and added numerous 7extensions to the distribution (including an extension that mimics PHP Markdown 8Extra), all while maintaining backward compatibility with the end user API in 9version 1.7. 10 11Python-Markdown supports Python versions 2.3, 2.4, 2.5, and 2.6. We've even 12released a version converted to Python 3.0! 13 14Backwards-incompatible Changes 15------------------------------ 16 17While Python-Markdown has experienced numerous internal changes, those changes 18should only affect extension authors. If you have not written your own 19extensions, then you should not need to make any changes to your code. 20However, you may want to ensure that any third party extensions you are using 21are compatible with the new API. 22 23The new extension API is fully documented in [[writing_extensions]]. Below is a 24summary of the significant changes: 25 26* The old home-grown NanoDOM has been replaced with ElementTree. Therefore all 27 extensions must use ElementTree rather than the old NanoDOM. 28* The various processors and patterns are now stored with OrderedDicts rather 29 than lists. Any code adding processors and/or patterns into Python-Markdown 30 will need to be adjusted to use the new API using OrderedDicts. 31* The various types of processors available have been either combined, added, 32 or removed. Ensure that your processors match the currently supported types. 33 34What's New in Python-Markdown 2.0 35--------------------------------- 36 37Thanks to the work of Artem Yunusov as part of GSoC 2008, Python-Markdown uses 38ElementTree internally to build the (X)HTML document from markdown source text. 39This has resolved various issues with the older home-grown NanoDOM and made 40notable increases in performance. 41 42Artem also refactored the Inline Patterns to better support nested patterns 43which has resolved many inconsistencies in Python-Markdown's parsing of the 44markdown syntax. 45 46The core parser had been completely rewritten, increasing performance and, for 47the first time, making it possible to override/add/change the way block level 48content is parsed. 49 50Python-Markdown now parses markdown source text more closely to the other 51popular implementations (Perl, PHP, etc.) than it ever has before. With the 52exception of a few minor insignificant differences, any difference should be 53considered a bug, rather than a limitation of the parser. 54 55The option to return HTML4 output as apposed to XHTML has been added. In 56addition, extensions should be able to easily add additional output formats. 57 58As part of implementing markdown in the Dr. Project project (a Trac fork), among 59other things, David Wolever refactored the "extension" keyword so that it 60accepts either the extension names as strings or instances of extensions. This 61makes it possible to include multiple extensions in a single module. 62 63Numerous extensions are included in the distribution by default. See 64[[available_extensions]] for a complete list. 65 66See the [[change_log]] for a full list of changes. 67 68