Time for an update to PHP Markdown and PHP Markdown Extra.

<http://michelf.com/project/php-markdown/>

This new version of PHP Markdown Extra adds support for "fenced" code blocks (which I was previously calling "flat"). Fenced code blocks overcome many limitations of Markdown's indented code blocks: they can can be put immediately following a list item, can start and end with blank lines, and can be put one after the other as two consecutive code blocks. Also, if you're using an editor which cannot indent automatically a selected block of text, such as a text box in your web browser, it's easier to paste code in.

<http://michelf.com/projects/php-markdown/extra/#fenced-code-blocks>


1.0.1l (11 May 2008):

*       Now removing the UTF-8 BOM at the start of a document, if present.

*       Now accepting capitalized URI schemes (such as HTTP:) in automatic
        links, such as `<HTTP://EXAMPLE.COM/>`.

*       Fixed a problem where `<[EMAIL PROTECTED]>` was seen as a horizontal
        rule instead of an automatic link.

*       Fixed an issue where some characters in Markdown-generated HTML
        attributes weren't properly escaped with entities.

*       Fix for code blocks as first element of a list item. Previously,
        this didn't create any code block for item 2:
        
                *   Item 1 (regular paragraph)
                
                *       Item 2 (code block)

*       A code block starting on the second line of a document wasn't seen
        as a code block. This has been fixed.
        
*       Added programatically-settable parser properties `predef_urls` and
        `predef_titles` for predefined URLs and titles for reference-style
        links. To use this, your PHP code must call the parser this way:
        
                $parser = new Markdwon_Parser;
                $parser->predef_urls = array('linkref' => 'http://example.com');
                $html = $parser->transform($text);
        
        You can then use the URL as a normal link reference:
        
                [my link][linkref]      
                [my link][linkRef]
                
        Reference names in the parser properties *must* be lowercase.
        Reference names in the Markdown source may have any case.

*       Added `setup` and `teardown` methods which can be used by subclassers
        as hook points to arrange the state of some parser variables before and
        after parsing.


Extra 1.2 (11 May 2008):

*       Added fenced code block syntax which don't require indentation
        and can start and end with blank lines. A fenced code block
        starts with a line of consecutive tilde (~) and ends on the
        next line with the same number of consecutive tilde. Here's an
        example:
        
            ~~~~~~~~~~~~
            Hello World!
            ~~~~~~~~~~~~

*       Rewrote parts of the HTML block parser to better accomodate
        fenced code blocks.

*       Footnotes may now be referenced from within another footnote.

*       Added programatically-settable parser property `predef_attr` for
        predefined attribute definitions.

*       Fixed an issue where an indented code block preceded by a blank
        line containing some other whitespace would confuse the HTML
        block parser into creating an HTML block when it should have
        been code.


Michel Fortin
[EMAIL PROTECTED]
http://michelf.com/


_______________________________________________
Markdown-Discuss mailing list
[email protected]
http://six.pairlist.net/mailman/listinfo/markdown-discuss

Reply via email to