[ANN] PHP Markdown 1.0b5
Michel Fortin
michel.fortin at michelf.com
Mon May 3 06:30:11 EDT 2004
Le 2 mai 2004, à 19:10, Lou Quillio a écrit :
> Michel, would you consider objectifying PHP Markdown? If it were a
> class, I'm certain I could arrange for it to be shipping as a standard
> plug-in for Expression Engine and pMachine immediately. C'est trop
> difficile pour moi, parce que je suis seulement un intrus. On dit
> "intrus" pour "hacker," non? The plug-in architecture for Textpattern
> would also more easily accept a PHP Markdown class.
In French, "Intrus" is more like Intruder than Hacker. I guess that's
not what you meant. Hacker is a difficult word to translate in French
because it really depends of what you means. Often we even directly use
the english word, because it's easier. I'm not sure what French word to
choose in this context.
But you're right. It's difficult. I've made some experiments to that
end and found no satisfaction from the result *yet*. Making it work as
a class is not the problem here -- it's already done, mostly. It won't
be a problem to anyone who use it either.
What I worry about is propagating the changes John makes to his Perl
version. Currently most things are kept in the same order as in the
original and looks pretty much the same. This render the task of
updating really easy. But making it a class impose some constrains, for
example some class variables will need to be initialized from a
constructor and two or three expressions will need to be reorganized as
a callback. It will also require the insertion of `$this->` before
every class variables and functions, and curly brackets around them
when they are inserted into a string. This increase the number of
changes I have to perform when pasting Perl code each time I make an
update, and increase the probability of bugs too.
I also understand that having global variables and functions lying
around in a global namespace is not ideal. This could be mostly solved
by adding a MD prefix to functions and global variables.
Is there any other reasons to enclose all the code into a class? If
plugins could be made by adding a small plugin class in the file simply
calling the Markdown function, would it be as good? I guess I need some
feedback on these two questions before I decide what to do.
Michel Fortin
michel.fortin at michelf.com
http://www.michelf.com/
More information about the Markdown-discuss
mailing list