[TxMt] Markdown Extra for Markdown Bundle?

Ciarán Walsh ciawal at gmail.com
Tue Aug 21 04:29:19 UTC 2007


Hi,

I’m catching up on unread items and I just saw this – you can  
simplify this script
On 16 Aug 2007, at 07:15, Fred B wrote:

>
> Here the script:
>
> ✂------✂------✂------✂------✂------✂------✂------ 
> ✂------✂------✂------
> #!/usr/bin/php -q
>
> <?php
>     include_once "/path/to/markdown-extra.php";
>
>        while (!feof(STDIN)) {
>            $my_text .= fread(STDIN, 4096);
>        }
>
>     $my_html = Markdown($my_text);
>
>     echo $my_html;
> ?>
> ✂------✂------✂------✂------✂------✂------✂------ 
> ✂------✂------✂------

to just

<?php
include_once "/path/to/markdown-extra.php";
echo Markdown(file_get_contents('php://stdin'));
?>

which perhaps will be marginally faster.

Ciarán
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macromates.com/textmate/attachments/20070820/d0e259fb/attachment.html>


More information about the textmate mailing list