Modify

Ticket #340 (closed defect: fixed)

Opened 3 years ago

Last modified 3 years ago

[PATCH] Foreach Task should trim list values

Reported by: Anonymous Owned by: hans
Priority: major Milestone:
Component: phing-tasks-system Version: 2.3.2
Keywords: Cc:

Description

The foreach task should apply a trim to the entries of the list. The reason for this is a better readability of longer lists in the build file. Right now, a line break or a space or tab would break the foreach loop in at least one place in the looped target. Example:

<!-- works well -->
<property name="list" value="a,b,c,d" />

<!-- does not work -->
<property name="list" value="a,
                             b,
                             c,
                             d"
>

<!-- foreach call -->
<foreach list="${list}" param="..." target="..." />

In my opinion, the foreach call should provide the same values to the task in both ways.

Attachments

ForeachTask.php.patch Download (638 bytes) - added by anonymous 3 years ago.

Change History

Changed 3 years ago by anonymous

comment:1 Changed 3 years ago by mrook

(In [445]) Refs #340 - trim list values

comment:2 Changed 3 years ago by mrook

  • Status changed from new to closed
  • Resolution set to fixed

This bug has been fixed in the SVN tree, revision r445.

Thank you for the report, and for helping us make Phing better!

View

Add a comment

Modify Ticket

Action
as closed
The resolution will be deleted. Next status will be 'reopened'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.