mirror of
https://github.com/google/blockly.git
synced 2026-01-07 00:50:27 +01:00
Do not escape % in python strings. (#1982)
Rebase of PR-1890, commit 793055… from Ellipsis753:patch-1
This commit is contained in:
committed by
GitHub
parent
49955bd984
commit
f42291ea64
@@ -224,8 +224,7 @@ Blockly.Python.scrubNakedValue = function(line) {
|
||||
Blockly.Python.quote_ = function(string) {
|
||||
// Can't use goog.string.quote since % must also be escaped.
|
||||
string = string.replace(/\\/g, '\\\\')
|
||||
.replace(/\n/g, '\\\n')
|
||||
.replace(/\%/g, '\\%');
|
||||
.replace(/\n/g, '\\\n');
|
||||
|
||||
// Follow the CPython behaviour of repr() for a non-byte string.
|
||||
var quote = '\'';
|
||||
|
||||
Reference in New Issue
Block a user