From michel.fortin at michelf.com Thu Oct 1 10:03:04 2009 From: michel.fortin at michelf.com (Michel Fortin) Date: Thu, 01 Oct 2009 10:03:04 -0400 Subject: Textpattern and underscores In-Reply-To: <44b715290909270210g1114e3c0w5c9131bfeda941c7@mail.gmail.com> References: <44b715290909270158m59e25daeu2286ace2adb0b26@mail.gmail.com> <44b715290909270210g1114e3c0w5c9131bfeda941c7@mail.gmail.com> Message-ID: Le 2009-09-27 ? 5:10, Peter Sinn a ?crit : > When using Textpattern with PHP Markdown Extra there is a problem > with the > textpattern tags. Tags like are parsed, but > tags like > that have an underscore are not. Any ideas how to > deal > with this? Hum, looks like a problem in the tag matching pattern. I'll fix it for the next release. You can also fix it yourself right now by looking at the function `parseSpan` and replacing line 1542 (or a line near that number) which looks like this: <[/!$]?[-a-zA-Z0-9:]+ # regular tags with this one (note the added underscore): <[/!$]?[-a-zA-Z0-9:_]+ # regular tags Sorry for the long delay to answer. -- Michel Fortin michel.fortin at michelf.com http://michelf.com/ From michel.fortin at michelf.com Sat Oct 10 13:23:49 2009 From: michel.fortin at michelf.com (Michel Fortin) Date: Sat, 10 Oct 2009 13:23:49 -0400 Subject: PHP Markdown 1.0.1n & Extra 1.2.4 Message-ID: <9E3921CA-670B-41C7-AD35-1FDE8016703A@michelf.com> Hello all. This is an update to PHP Markdown and PHP Markdown Extra correcting a couple of bugs that got reported since last release. I also decided to enable in this release shortcut-style reference links (as present in Markdown.pl 1.0.2 beta), as most implementations of Markdown accepts them by default. It's also because waiting for John to release officially version 1.0.2 as an actual release (instead of a beta) for enabling this feature looks like a dead end at the moment. So you can download it from here: As usual, you can also grab the latest release from the PEAR channel at or the Git repository mirror at Here is the detailed list of changes. 1.0.1n (10 Oct 2009): * Enabled reference-style shortcut links. Now you can write reference- style links with less brakets: This is [my website]. [my website]: http://example.com/ This was added in the 1.0.2 betas, but commented out in the 1.0.1 branch, waiting for the feature to be officialized. [But half of the other Markdown implementations are supporting this syntax][half], so it makes sense for compatibility's sake to allow it in PHP Markdown too. [half]: http://babelmark.bobtfish.net/?markdown=This+is+%5Bmy+website%5D.%0D%0A%09%09%0D%0A%5Bmy+website%5D%3A+http%3A%2F%2Fexample.com%2F%0D%0A&src=1&dest=2 * Now accepting many valid email addresses in autolinks that were previously rejected, such as: <"abc at def"@example.com> <"Fred Bloggs"@example.com> * Now accepting spaces in URLs for inline and reference-style links. Such URLs need to be surrounded by angle brakets. For instance: [link text]( "optional title") [link text][ref] [ref]: "optional title" There is still a quirk which may prevent this from working correctly with relative URLs in inline-style links however. * Fix for adjacent list of different kind where the second list could end as a sublist of the first when not separated by an empty line. * Fixed a bug where inline-style links wouldn't be recognized when the link definition contains a line break between the url and the title. * Fixed a bug where tags where the name contains an underscore aren't parsed correctly. * Fixed some corner-cases mixing underscore-ephasis and asterisk- emphasis. Extra 1.2.4 (10 Oct 2009): * Fixed a problem where unterminated tags in indented code blocks could prevent proper escaping of characaters in the code block. -- Michel Fortin michel.fortin at michelf.com http://michelf.com/ From costa at mouldwarp.com Sun Oct 18 20:27:16 2009 From: costa at mouldwarp.com (Costa Shapiro) Date: Mon, 19 Oct 2009 02:27:16 +0200 Subject: Treetop or like grammar for Markdown (in Ruby) Message-ID: Has anyone seen any attempts to give Markdown a PEG (parsing expressions grammar) recognizable by some ruby PEG parser generator grammar like Treetop? http://treetop.rubyforge.org/ From jgm at berkeley.edu Sun Oct 18 21:47:53 2009 From: jgm at berkeley.edu (John MacFarlane) Date: Sun, 18 Oct 2009 18:47:53 -0700 Subject: Treetop or like grammar for Markdown (in Ruby) In-Reply-To: References: Message-ID: <20091019014752.GA21656@protagoras.phil.berkeley.edu> I've built three different markdown implementations on top of PEG grammars: peg-markdown (C): http://github.com/jgm/peg-markdown lunamark (lua): http://github.com/jgm/lunamark markdown-peg (haskell): http://github.com/jgm/markdown-peg Ryan Tomayko has created ruby bindings for peg-markdown and packaged it as a gem: http://github.com/rtomayko/rpeg-markdown/ John +++ Costa Shapiro [Oct 19 09 02:27 ]: > Has anyone seen any attempts to give Markdown a PEG (parsing > expressions grammar) recognizable by some ruby PEG parser generator > grammar like Treetop? > http://treetop.rubyforge.org/ > _______________________________________________ > Markdown-Discuss mailing list > Markdown-Discuss at six.pairlist.net > http://six.pairlist.net/mailman/listinfo/markdown-discuss From costa at mouldwarp.com Mon Oct 19 12:40:52 2009 From: costa at mouldwarp.com (Costa Shapiro) Date: Mon, 19 Oct 2009 18:40:52 +0200 Subject: Treetop or like grammar for Markdown (in Ruby) In-Reply-To: References: Message-ID: Thanks John, but I've already seen these options. I'm looking for a nicer Ruby option (with on-the-fly object creation) which will be easy to extend. Say, if I had Markdown in Treetop, I could use it for higher-level object-in-text recognition by just adding some higher-level rules. Such a parser may serve not only format conversions, but also do semantic data extraction and such. I'm not currently aimed at the highest performance, but rather accessibility of extension. Any ideas are welcome, of course. Costa. +++ John MacFarlane [Oct 18 09 18:47 ]: > I've built three different markdown implementations on top of PEG > grammars: > > peg-markdown (C): http://github.com/jgm/peg-markdown > lunamark (lua): http://github.com/jgm/lunamark > markdown-peg (haskell): http://github.com/jgm/markdown-peg > > Ryan Tomayko has created ruby bindings for peg-markdown > and packaged it as a gem: http://github.com/rtomayko/rpeg-markdown/ > > John > > +++ Costa Shapiro [Oct 19 09 02:27 ]: > > Has anyone seen any attempts to give Markdown a PEG (parsing > > expressions grammar) recognizable by some ruby PEG parser generator > > grammar like Treetop? > > http://treetop.rubyforge.org/ > > _______________________________________________ > > Markdown-Discuss mailing list > > Markdown-Discuss at six.pairlist.net > > http://six.pairlist.net/mailman/listinfo/markdown-discuss > _______________________________________________ > Markdown-Discuss mailing list > Markdown-Discuss at six.pairlist.net > http://six.pairlist.net/mailman/listinfo/markdown-discuss From jgm at berkeley.edu Mon Oct 19 12:52:46 2009 From: jgm at berkeley.edu (John MacFarlane) Date: Mon, 19 Oct 2009 09:52:46 -0700 Subject: Treetop or like grammar for Markdown (in Ruby) In-Reply-To: References: Message-ID: <20091019165245.GA3088@protagoras.phil.berkeley.edu> +++ Costa Shapiro [Oct 19 09 18:40 ]: > Thanks John, but I've already seen these options. > I'm looking for a nicer Ruby option (with on-the-fly object creation) > which will be easy to extend. Sure. The thought was that you might be able to draw on some of the work I've done in creating the grammar, rather than reinventing the wheel. The syntax details vary from one PEG library to another, but once you've got an implementation for one, it's not hard to port it to another (in your case, treetop). John From costa at mouldwarp.com Mon Oct 19 13:38:39 2009 From: costa at mouldwarp.com (Costa Shapiro) Date: Mon, 19 Oct 2009 19:38:39 +0200 Subject: Treetop or like grammar for Markdown (in Ruby) In-Reply-To: <20091019165245.GA3088@protagoras.phil.berkeley.edu> References: <20091019165245.GA3088@protagoras.phil.berkeley.edu> Message-ID: Thanks a lot. Looks like I'm only short of leg2tt (hmm..:) And it may really be not so hard to write -- assuming some limitations and using the leg grammar with leg. 2009/10/19 John MacFarlane : > +++ Costa Shapiro [Oct 19 09 18:40 ]: >> Thanks John, but I've already seen these options. >> I'm looking for a nicer Ruby option (with on-the-fly object creation) >> which will be easy to extend. > > Sure. ?The thought was that you might be able to draw on some of > the work I've done in creating the grammar, rather than reinventing > the wheel. ?The syntax details vary from one PEG library to another, > but once you've got an implementation for one, it's not hard to port > it to another (in your case, treetop). > > John > _______________________________________________ > Markdown-Discuss mailing list > Markdown-Discuss at six.pairlist.net > http://six.pairlist.net/mailman/listinfo/markdown-discuss > From ajgb at st-maurices.n-lanark.sch.uk Mon Oct 19 15:20:39 2009 From: ajgb at st-maurices.n-lanark.sch.uk (AJG Baeumel) Date: Mon, 19 Oct 2009 20:20:39 +0100 Subject: Markdown Support in Drupal6.14? Message-ID: Why is Marksmarty no longersupported in Drupal 6.14? AJG B?umel mailto:ajgB at st-maurices.n-lanark.sch.uk --------------------------------------------------------------------------- This e-mail and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this e-mail in error, please notify the System Manager and thereafter delete the e-mail from your system. The System Manager may be contacted at postmaster at nleducation.org.uk E-mail transmission is not secure and information can be intercepted, corrupted, lost, destroyed, delayed or incomplete. The sender does not accept any liability for errors or omissions arising as a result of e-mail transmission or interception. Please note that incoming e-mails are routinely scanned for the purpose of detecting offensive or inappropriate materials. -------------- next part -------------- An HTML attachment was scrubbed... URL: From public at quillio.com Mon Oct 19 23:22:47 2009 From: public at quillio.com (Lou Quillio) Date: Mon, 19 Oct 2009 23:22:47 -0400 Subject: Markdown Support in Drupal6.14? In-Reply-To: References: Message-ID: On Mon, Oct 19, 2009 at 3:20 PM, AJG Baeumel wrote: > Why is Marksmarty no longersupported in Drupal 6.14? It's been a while since I've worked with Drupal, but I remember that MarkSmarty was really just a hybrid convenience filter. It's better to apply the SmartyPants and Markdown filters (in that order) to your content, and update them by dropping-in Michel's latest PHP libs if the Drupal-supplied ones fall out of date. http://michelf.com/projects/php-smartypants/ http://michelf.com/projects/php-markdown/ WRT what the Drupal community supports or doesn't, those questions are best answered by them. Best, LQ From joonas.pulakka at iki.fi Thu Oct 22 13:29:02 2009 From: joonas.pulakka at iki.fi (Joonas Pulakka) Date: Thu, 22 Oct 2009 20:29:02 +0300 Subject: Order of Markdown and SmartyPants filters (was: Re: Markdown Support in Drupal6.14?) Message-ID: 2009/10/20 Lou Quillio > On Mon, Oct 19, 2009 at 3:20 PM, AJG Baeumel > wrote: > > Why is Marksmarty no longersupported in Drupal 6.14? > > It's been a while since I've worked with Drupal, but I remember that > MarkSmarty was really just a hybrid convenience filter. It's better to > apply the SmartyPants and Markdown filters (in that order) to your > content, and update them by dropping-in Michel's latest PHP libs if > the Drupal-supplied ones fall out of date. > I'm now puzzled which is the correct order to apply the filters. SmartyPants first and Markdown then (as above), or the other way round (as you suggested a couple of months ago :-)? http://six.pairlist.net/pipermail/markdown-discuss/2009-September/001647.html Best Regards, Joonas -------------- next part -------------- An HTML attachment was scrubbed... URL: From michel.fortin at michelf.com Thu Oct 22 16:30:00 2009 From: michel.fortin at michelf.com (Michel Fortin) Date: Thu, 22 Oct 2009 16:30:00 -0400 Subject: Order of Markdown and SmartyPants filters (was: Re: Markdown Support in Drupal6.14?) In-Reply-To: References: Message-ID: <1642B982-4D53-4F78-9027-0C62781288B0@michelf.com> Le 2009-10-22 ? 13:29, Joonas Pulakka a ?crit : > 2009/10/20 Lou Quillio > >> On Mon, Oct 19, 2009 at 3:20 PM, AJG Baeumel >> wrote: >>> Why is Marksmarty no longersupported in Drupal 6.14? >> >> It's been a while since I've worked with Drupal, but I remember that >> MarkSmarty was really just a hybrid convenience filter. It's better >> to >> apply the SmartyPants and Markdown filters (in that order) to your >> content, and update them by dropping-in Michel's latest PHP libs if >> the Drupal-supplied ones fall out of date. >> > > I'm now puzzled which is the correct order to apply the filters. > SmartyPants > first and Markdown then (as above), or the other way round (as you > suggested > a couple of months ago :-)? > http://six.pairlist.net/pipermail/markdown-discuss/2009-September/001647.html Markdown, then Smartypants. If you run Smartypants first, it'll convert characters like quotes to curly ones in link definitions and code samples, and the result won't be processed correctly by the Markdown filter. Smartypants wants HTML-formatted input, not Markdown- formatted input. This is documented in the PHP Markdown Readme: > If you wish to use PHP Markdown with another text filter function > built to parse HTML, you should filter the text *after* the Markdown > function call. This is an example with PHP SmartyPants: > > $my_html = SmartyPants(Markdown($my_text)); -- Michel Fortin michel.fortin at michelf.com http://michelf.com/ From jerry at ieee.org Thu Oct 22 17:35:40 2009 From: jerry at ieee.org (Jerry Krinock) Date: Thu, 22 Oct 2009 14:35:40 -0700 Subject: Order of Markdown and SmartyPants filters (was: Re: Markdown Support in Drupal6.14?) In-Reply-To: <1642B982-4D53-4F78-9027-0C62781288B0@michelf.com> References: <1642B982-4D53-4F78-9027-0C62781288B0@michelf.com> Message-ID: On 2009 Oct 22, at 13:30, Michel Fortin wrote: > Markdown, then Smartypants Indeed, I just checked my script and this is the order I ended up with. From public at quillio.com Thu Oct 22 18:00:03 2009 From: public at quillio.com (Lou Quillio) Date: Thu, 22 Oct 2009 18:00:03 -0400 Subject: Order of Markdown and SmartyPants filters (was: Re: Markdown Support in Drupal6.14?) In-Reply-To: References: <1642B982-4D53-4F78-9027-0C62781288B0@michelf.com> Message-ID: >> Markdown, then Smartypants > Indeed, I just checked my script and this is the order I ended up with. Very sorry. Must have been a late night. Of course Smartypants takes X/HTML input. LQ From joonas.pulakka at iki.fi Fri Oct 23 02:36:56 2009 From: joonas.pulakka at iki.fi (Joonas Pulakka) Date: Fri, 23 Oct 2009 09:36:56 +0300 Subject: Order of Markdown and SmartyPants filters (was: Re: Markdown Support in Drupal6.14?) In-Reply-To: <1642B982-4D53-4F78-9027-0C62781288B0@michelf.com> References: <1642B982-4D53-4F78-9027-0C62781288B0@michelf.com> Message-ID: 2009/10/22 Michel Fortin > Le 2009-10-22 ? 13:29, Joonas Pulakka a ?crit : > >> >> I'm now puzzled which is the correct order to apply the filters. >> SmartyPants >> first and Markdown then (as above), or the other way round (as you >> suggested >> a couple of months ago :-)? >> >> http://six.pairlist.net/pipermail/markdown-discuss/2009-September/001647.html >> > > Markdown, then Smartypants. If you run Smartypants first, it'll convert > characters like quotes to curly ones in link definitions and code samples, > and the result won't be processed correctly by the Markdown filter. > Smartypants wants HTML-formatted input, not Markdown-formatted input. > > This is documented in the PHP Markdown Readme: > Thanks, it's clear now! Including that in SmartyPants documentation too might be a good idea, since some people (well, I at least) first get acquainted with Markdown and later want to add SmartyPants on top of it, and then keep looking for instructions from SmartyPants documentation... Best Regards, Joonas -------------- next part -------------- An HTML attachment was scrubbed... URL: