[pmwiki-users] call Markup() from a function

Sebastian Siedentopf schlaefer at macnews.de
Sat Jul 30 11:12:28 CDT 2005


I was playing around with the php Markdown library http:// 
www.michelf.com/projects/php-markdown/ and PmWiki integration. I  
wanted a markup y what says the next code is Markdown but the ability  
to still use normal wiki links for example.

To do so I have to change some PmWiki standard markup in the Markdown  
range ('urllink' and 'img').

I ended up with injecting code in $markrules in MarkupToHTML() when  
in Markdown mode and just BuildMarkupRules() when reentering PmWiki  
mode. It wasn't pretty, indeed.

At last I settled down with plain Markdown markup http:// 
www.pmwiki.org/wiki/Cookbook/MarkdownMarkupExtension. For me the  
benefits are not worth the effort to dig deeper at the moment.

Sebastian

PS: And yes, there is probably a better solution. ;)

Am 30.07.2005 um 17:17 schrieb Patrick R. Michaud:

> On Sat, Jul 30, 2005 at 08:37:24AM +0200, Sebastian Siedentopf wrote:
>
>> I have problems to alter a markup x from stdmarkup.php or add a new
>> markup x if a particular custom markup y is called:
>>
>>  Markup('y',...,fct_y());
>>
>>  function fct_y() {
>>  Markup('x',...);
>>  }
>>
>> The Markup() call for x seems to have no effect when called from
>> inside function fct_y().
>>
>
> You're wanting a markup to be able to add a new markup rule...?
> Hmmm, it can be done, but it won't be pretty, and I suspect there
> would be other easier ways to do it.  Can you give a slightly
> more detailed example of what you're wanting to do?
>
> Pm
>
>





More information about the pmwiki-users mailing list