PEAR is discontinued

This is a static archive preserving historical releases and metadata. No new packages or updates will be published. For updates to existing packages, or to publish new packages, please use Composer and Packagist.

Home » Text » Text_Wiki_Mediawiki » Bug #8503

Comment parser

Details

Request #8503Comment parser
Submitted2006-08-18 14:17 UTC
Frombjs5075 at rit dot edu
Assignedritzmo
StatusClosed
PackageText_Wiki_Mediawiki
PHP Version5.1.4
OSDebian etch
Roadmaps(Not assigned)

Comments

[2006-08-18 14:17 UTC] bjs5075 at rit dot edu

Description:
------------
I have added a simple comment parser that just takes them
out. The comment should be the first elements parsed
(after 'Delimiter', before 'Preformatted').

Simply match:
'/<\!--(.*)-->/Us'
or the '.*?' if you prefer, and return empty string.

I called the parse element 'Comment'.

Test script:
---------------
Mediawiki source:
Invisible comments to editors ( <!-- here --> )
only appear while editing the page.

Expected result:
----------------
Invisible comments to editors ( ) only appear while
editing the page.

Actual result:
--------------
Invisible comments to editors ( <!-- here --> ) only
appear while editing the page.