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 » Bug #1616

blockquote depth parsed incorrectly at start

Details

Submitted2004-06-11 16:35 UTC
Fromtjw at tjw dot org
Assignedpmjones
StatusClosed
PackageText_Wiki
PHP VersionIrrelevant
OSLinux
Roadmaps(Not assigned)

Comments

[2004-06-11 16:35 UTC] tjw at tjw dot org

Description:
------------
Using Text_Wiki 0.19.1 blockquotes don't parse correctly if the depth is greater than 1. This is because only one level is allowed to be added per line.

On line 96 of Text/Wiki/Parse/Blockquote.php:

// add a level to the list?
if ($level > count($stack)) {

Should be changed to:

// add a level to the list?
while ($level > count($stack)) {

Reproduce code:
---------------
>> line 1
>> line 2
>> line 3

Expected result:
----------------
All three lines should be in the same blockquote that has
a depth of 2:

line 1
line 2
line 3

Actual result:
--------------
Depth is not parsed properly if the blockquote has a depth
greater than 1, and only adds 1 layer of depth per line:

line 1
line 2
line 3