Joonas Pulakka
2009-Oct-22 17:29 UTC
Order of Markdown and SmartyPants filters (was: Re: Markdown Support in Drupal6.14?)
2009/10/20 Lou Quillio <public at quillio.com>> On Mon, Oct 19, 2009 at 3:20 PM, AJG Baeumel > <ajgb at st-maurices.n-lanark.sch.uk> 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: <http://six.pairlist.net/pipermail/markdown-discuss/attachments/20091022/954a9a5f/attachment.html>
Michel Fortin
2009-Oct-22 20:30 UTC
Order of Markdown and SmartyPants filters (was: Re: Markdown Support in Drupal6.14?)
Le 2009-10-22 ? 13:29, Joonas Pulakka a ?crit :> 2009/10/20 Lou Quillio <public at quillio.com> > >> On Mon, Oct 19, 2009 at 3:20 PM, AJG Baeumel >> <ajgb at st-maurices.n-lanark.sch.uk> 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.htmlMarkdown, 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/
Jerry Krinock
2009-Oct-22 21:35 UTC
Order of Markdown and SmartyPants filters (was: Re: Markdown Support in Drupal6.14?)
On 2009 Oct 22, at 13:30, Michel Fortin wrote:> Markdown, then SmartypantsIndeed, I just checked my script and this is the order I ended up with.
Lou Quillio
2009-Oct-22 22:00 UTC
Order of Markdown and SmartyPants filters (was: Re: Markdown Support in Drupal6.14?)
>> 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