Re: Text_Wiki Problems....
| From: | Justin Patrin | Date: | Wed, 18 Aug 2004 18:01:58 +0000 |
| Subject: | Re: Text_Wiki Problems.... | ||
| References: | 1 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-32756@lists.php.net to get a copy of this message | ||
On Wed, 18 Aug 2004 13:19:54 -0400, Davey <davey@php.net> wrote:
> Hey PEARs, Paul
>
> I'm trying to use Text_Wiki in my templating engine, and I'm having issues:
>
> <?php
> require_once 'Text/Wiki.php';
> $wiki =& new Text_Wiki;
> $wiki_text = <<<WIKI
> + Header Level 1
>
> Here's a paragraph and a link to <a
> href="somewhere">foo</a>
>
> * list item 1
> * list item 2
> WIKI;
> $xhtml = $wiki->transform($wiki_text, 'Xhtml');
Perhaps try removing the 'Xhtml' from the transform call? Here's what
I'm using and it works fine:
require_once('Text/Wiki.php');
$wiki =& new Text_Wiki();
echo $wiki->transform($text);
> echo $xhtml;
> ?>
>
> outputs:
>
> <p>+ Header Level 1<br />
> <br />
> Here's a paragraph and a link to <a
> href="somewhere">foo</a><br />
> <br />
> * list item 1<br />
> * list item 2</p>
>
> (please note that my template engine takes care of the <a> element)
>
> As you can see, all its putting in paragraphs and new lines. I have
> tried this on PHP 4.3.6 and 5.0.1, same result. What am I doing wrong!?
>
--
DB_DataObject_FormBuilder - The database at your fingertips
http://pear.php.net/package/DB_DataObject_FormBuilder
paperCrane --Justin Patrin--