I'd like to allow all directives be able to stretch across multiple lines. An
example might be:
#set ($a =
#if( $biglongreference ==
"very big long string")
The rationale for this is that newlines are sometimes silently inserted by web
design applications into arbitrary HTML. For example, many of our users work
with Macromedia DreamWeaver. DreamWeaver is not aware of VTL, and treats it
like ordinary text. A user might type VTL in the "HTML" mode of DreamWeaver,
only to see the VTL reformatted as paragraphed text after
editing/saving/reloading. This means that a web page with VTL might work fine
one day, and then break after the page is loaded/saved by the tool. This can
be highly confusing, especially to the less technical template writers who
might be using the web design program in the first place.
In addition (although this is a less important reason), most scripting
languages permit newlines within control statements.
A couple of notes about this bug report and patch.
(1) It's 100% backwards compatible, and passes "ant test"
(2) The change is simple (despite the long patch). I simply replaced most
references to <WHITESPACE> in Parser.jjt with <WHITESPACE_NEWLINE>
(3) This is a completely separate issue from any debates over gobbling
whitespace (Bug# 7940) or allowing multiline literals (Bug # 17803).
(4) Whitespace gobbling rules at start/end of directive remain the same. (I
think this should be addressed separately).
|Workflow||Default workflow, editable Closed status [ 12551875 ]||jira [ 12552402 ]|
|Workflow||jira [ 12325096 ]||Default workflow, editable Closed status [ 12551875 ]|
|Field||Original Value||New Value|