#17536Patch for t3lib/class.t3lib_tsparser.php adding php-HEREDOC like syntax
Description
The TS multiline parenthesis syntax ( … ) doesn’t allow one to define such a multiline text :
config.something (
// this is php that will be eval’d if needed
$res = substr(
“hello world”,
0,
5
);
)
As the “);” closing of call to the php function fools the parser, breaking the multiline block.
I implemented a notation similar to php’s HEREDOC syntax ( http://www.php.net/manual/en/language.types.string.php#language.types.string.syntax.heredoc )
So The resulting TS would be:
config.something <<<SOMEPHP
// this is php that will be eval’d if needed
$res = substr(
“hello world”,
0,
5
);
>>>SOMEPHP
Note that “SOMEPHP” is variable and defined to whatever the user needs, thus completely avoiding the possibility of end-tag collision with the content.
I checked with TS analyzer and TS syntax highlighting, and patch works fine.
The patch is targeted for v4.1.1 of the file
(issue imported from #M6160)
Reviews 0
No change resolves or names this issue in its commit message, and no comment links one.