From 315d1f98065856f94fdbfec8d2bd50cca59977af Mon Sep 17 00:00:00 2001 From: Michel Fortin Date: Mon, 5 May 2008 07:52:16 -0400 Subject: [PATCH 1/4] Added more precision to the predefined URLs and titles feature. --- PHP Markdown Readme.text | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/PHP Markdown Readme.text b/PHP Markdown Readme.text index edf6ab7..14871e6 100644 --- a/PHP Markdown Readme.text +++ b/PHP Markdown Readme.text @@ -224,12 +224,20 @@ Current: as a code block. This has been fixed. * Added programatically-settable parser properties `predef_urls` and - `predef_titles` for predefined URLs and link titles. To use this, - your PHP code must call the parser this way: + `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['my_url_ref'] = 'http://example.com'; + $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 From 65737a4454f07e0726fe28a846624dede3e9ee5d Mon Sep 17 00:00:00 2001 From: Michel Fortin Date: Mon, 5 May 2008 07:55:10 -0400 Subject: [PATCH 2/4] Fixed a typo. --- PHP Markdown Readme.text | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PHP Markdown Readme.text b/PHP Markdown Readme.text index 14871e6..f75536e 100644 --- a/PHP Markdown Readme.text +++ b/PHP Markdown Readme.text @@ -220,7 +220,7 @@ Current: * Item 2 (code block) -* A code blocks starting on the second line of a document wasn't seen +* 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 From d8a71b1149234ee22e276b6edcf2e40049a5863f Mon Sep 17 00:00:00 2001 From: Michel Fortin Date: Sat, 10 May 2008 07:47:59 -0400 Subject: [PATCH 3/4] Fixed some out-of-date comment. --- markdown.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/markdown.php b/markdown.php index 72d9348..de2976e 100644 --- a/markdown.php +++ b/markdown.php @@ -507,7 +507,7 @@ class Markdown_Parser { # The $boundary argument specify what character should be used to surround # the token. By convension, "B" is used for block elements that needs not # to be wrapped into paragraph tags at the end, ":" is used for elements - # that are word separators and "S" is used for general span-level elements. + # that are word separators and "X" is used in the general case. # # Swap back any tag hash found in $text so we do not have to `unhash` # multiple times at the end. From af5af620d027d9961a20f12b9e173854c34cd0d6 Mon Sep 17 00:00:00 2001 From: Michel Fortin Date: Sat, 10 May 2008 07:48:40 -0400 Subject: [PATCH 4/4] Updated version numbers and copyright year. --- PHP Markdown Readme.text | 4 ++-- markdown.php | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/PHP Markdown Readme.text b/PHP Markdown Readme.text index f75536e..4ab68fb 100644 --- a/PHP Markdown Readme.text +++ b/PHP Markdown Readme.text @@ -1,7 +1,7 @@ PHP Markdown ============ -Version 1.0.1k - Wed 26 Sep 2007 +Version 1.0.1l - Sun 11 May 2008 by Michel Fortin @@ -200,7 +200,7 @@ expected; (3) the output PHP Markdown actually produced. Version History --------------- -Current: +1.0.1l: * Now removing the UTF-8 BOM at the start of a document, if present. diff --git a/markdown.php b/markdown.php index de2976e..05bdc89 100644 --- a/markdown.php +++ b/markdown.php @@ -3,7 +3,7 @@ # Markdown - A text-to-HTML conversion tool for web writers # # PHP Markdown -# Copyright (c) 2004-2007 Michel Fortin +# Copyright (c) 2004-2008 Michel Fortin # # # Original Markdown @@ -12,7 +12,7 @@ # -define( 'MARKDOWN_VERSION', "1.0.1k" ); # Wed 26 Sep 2007 +define( 'MARKDOWN_VERSION', "1.0.1l" ); # Sun 11 May 2008 # @@ -1538,7 +1538,7 @@ Copyright and License --------------------- PHP Markdown -Copyright (c) 2004-2007 Michel Fortin +Copyright (c) 2004-2008 Michel Fortin All rights reserved.