Re: Formatter.pm subclassing troubles
[email protected] (Kang-min Liu) Wed, 19 Apr 2006 16:45:07 +0800
| Newsgroups | perl.kwiki |
|---|---|
| Message-ID | <[email protected]> |
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On Apr 19, 2006, at 2:55 PM, FLoh Leeber wrote:
> Hi!
>
> Thanks fot the answer. I partially disagree, since the =20
> "Spoon::Formatter:..."-Classes in the beginning would work then =20
> either. I think the prefix permits kind of shortcuts for the =20
> classnames, but when a full classname is given, then it isn=B4t =20
> prefixed.
> I=B4ve gone through the code with the debugger, and in my opinion the =20=
> resulting "table"-array looks correct, that is, every =20
> "formatter_id"-entry has the correct classname associated, even my =20
> extension.
>
> However, I tried to modify the Kwiki::Formatter-class, and just =20
> copied an entry (what should be the lightest modification possible) =20=
> and modified the regex. Still no luck. http://www.kwiki.org/?=20
> KwikiFormatterModule refers only to overriding an existing format =20
> rule, which I do not want to do.
>
Hi,
You're right, I didn't digg into how the prefix works.
However, I just recalled that, to add a customized phrase to =20
Kwiki::Formatter,
you have to change 'all_phrases' too.
const all_phrases =3D> [qw(
asis wafl_phrase forced
titlehyper titlewiki titlemailto
hyper wiki mailto
ndash mdash strong em u tt del
)];
Inserting a 'userid' to here is necessary. Kwiki::Emoticon does this =20
too.
Cheers,
Kang-min Liu
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (Darwin)
iD8DBQFERfiVCSIfi0PaMDQRAh0JAJ4l626J3LARcrTeB/2FC165KAXCVgCcCAv9
abEOQJmVKMQ+2tzHMPCaYk8=3D
=3Dq7vz
-----END PGP SIGNATURE-----