View Task #459
Summary: Add obvious blank-line removal as optional compiler parameter
| Difficulty:
1 |
|
Version goal:
Future |
|
| Status:
Unassigned |
|
Description
The idea is to allow component designers to use blank lines to separate sections for readibility, without suffering whitespace bloat on the output end. The trimming rule (turned on with an optional compiler option) would be very narrow, perhaps "Remove single blank lines immediately before and after any section tag." Blank lines means just a newline, not whitespace and newline.
Consider the following typical component, in which all sections are separated with blank lines for readability (this is how components are written in the Mason HQ source and documentation):
<%once>
# Initialize once-variables
</%once>
This is the main body of the component.
This is the second line.
<%init>;
# Initialization code
</%init>
<%args>
$foo => undef
</%args>
This component outputs (with newlines shown as <nl>)
<nl>
This is the main body of the component.<nl>
This is the second line.<nl>
<nl>
<nl>
but I think it would be most DWIMish to output
This is the main body of the component.<nl>
This is the second line.<nl>
If I really want the extra newlines, I can just add them. The rule only removes a single newline before and after the section.
History
| May 10, 2003 12:56 PM |
|
Jonathan Swartz created task.
|
| May 10, 2003 12:56 PM |
|
Jonathan Swartz set version_goal to Future.
|
| May 10, 2003 12:57 PM |
|
Jonathan Swartz
writes: See also todo #406.
|