mirror of
https://github.com/google/blockly.git
synced 2026-01-07 17:10:11 +01:00
Fix order errors in text generators (#4329)
* Fix dart text generator logic * Fix Javascript text generator logic. * Fix Lua text generator logic * Fix php text generator logic * Fix python text generator logic * Fix error in substring logic * Fix unit test block generators * Update from ORDER_COMMA to ORDER_NONE * Update golden files
This commit is contained in:
@@ -207,7 +207,7 @@ Blockly.Python.scrubNakedValue = function(line) {
|
||||
* Encode a string as a properly escaped Python string, complete with quotes.
|
||||
* @param {string} string Text to encode.
|
||||
* @return {string} Python string.
|
||||
* @private
|
||||
* @protected
|
||||
*/
|
||||
Blockly.Python.quote_ = function(string) {
|
||||
// Can't use goog.string.quote since % must also be escaped.
|
||||
@@ -222,7 +222,7 @@ Blockly.Python.quote_ = function(string) {
|
||||
} else {
|
||||
string = string.replace(/'/g, '\\\'');
|
||||
}
|
||||
};
|
||||
}
|
||||
return quote + string + quote;
|
||||
};
|
||||
|
||||
@@ -231,7 +231,7 @@ Blockly.Python.quote_ = function(string) {
|
||||
* with quotes.
|
||||
* @param {string} string Text to encode.
|
||||
* @return {string} Python string.
|
||||
* @private
|
||||
* @protected
|
||||
*/
|
||||
Blockly.Python.multiline_quote_ = function(string) {
|
||||
var lines = string.split(/\n/g).map(Blockly.Python.quote_);
|
||||
@@ -248,7 +248,7 @@ Blockly.Python.multiline_quote_ = function(string) {
|
||||
* @param {string} code The Python code created for this block.
|
||||
* @param {boolean=} opt_thisOnly True to generate code for only this statement.
|
||||
* @return {string} Python code with comments and subsequent blocks added.
|
||||
* @private
|
||||
* @protected
|
||||
*/
|
||||
Blockly.Python.scrub_ = function(block, code, opt_thisOnly) {
|
||||
var commentCode = '';
|
||||
|
||||
Reference in New Issue
Block a user