mirror of
https://github.com/google/blockly.git
synced 2026-01-06 08:30:13 +01:00
Fix PHP multiline string
This commit is contained in:
@@ -207,7 +207,11 @@ Blockly.PHP.quote_ = function(string) {
|
||||
* @private
|
||||
*/
|
||||
Blockly.PHP.multiline_quote_ = function (string) {
|
||||
return '<<<EOT\n' + string + '\nEOT';
|
||||
var lines = string.split(/\n/g).map(Blockly.PHP.quote_);
|
||||
// Join with the following, plus a newline:
|
||||
// . "\n" .
|
||||
// Newline escaping only works in double-quoted strings.
|
||||
return lines.join(' . \"\\n\" .\n');
|
||||
};
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user