mirror of
https://github.com/google/blockly.git
synced 2026-01-08 09:30:06 +01:00
Remove claim that good.string.quote should be used.
This commit is contained in:
@@ -149,7 +149,7 @@ Blockly.Dart.scrubNakedValue = function(line) {
|
||||
* @private
|
||||
*/
|
||||
Blockly.Dart.quote_ = function(string) {
|
||||
// TODO: This is a quick hack. Replace with goog.string.quote
|
||||
// Can't use goog.string.quote since $ must also be escaped.
|
||||
string = string.replace(/\\/g, '\\\\')
|
||||
.replace(/\n/g, '\\\n')
|
||||
.replace(/\$/g, '\\$')
|
||||
|
||||
@@ -169,7 +169,8 @@ Blockly.JavaScript.scrubNakedValue = function(line) {
|
||||
* @private
|
||||
*/
|
||||
Blockly.JavaScript.quote_ = function(string) {
|
||||
// TODO: This is a quick hack. Replace with goog.string.quote
|
||||
// Can't use goog.string.quote since Google's style guide recommends
|
||||
// JS string literals use single quotes.
|
||||
string = string.replace(/\\/g, '\\\\')
|
||||
.replace(/\n/g, '\\\n')
|
||||
.replace(/'/g, '\\\'');
|
||||
|
||||
@@ -143,7 +143,6 @@ Blockly.Lua.scrubNakedValue = function(line) {
|
||||
* @private
|
||||
*/
|
||||
Blockly.Lua.quote_ = function(string) {
|
||||
// TODO: This is a quick hack. Replace with goog.string.quote
|
||||
string = string.replace(/\\/g, '\\\\')
|
||||
.replace(/\n/g, '\\\n')
|
||||
.replace(/'/g, '\\\'');
|
||||
|
||||
@@ -146,7 +146,6 @@ Blockly.PHP.scrubNakedValue = function(line) {
|
||||
* @private
|
||||
*/
|
||||
Blockly.PHP.quote_ = function(string) {
|
||||
// TODO: This is a quick hack. Replace with goog.string.quote
|
||||
string = string.replace(/\\/g, '\\\\')
|
||||
.replace(/\n/g, '\\\n')
|
||||
.replace(/'/g, '\\\'');
|
||||
|
||||
@@ -152,7 +152,7 @@ Blockly.Python.scrubNakedValue = function(line) {
|
||||
* @private
|
||||
*/
|
||||
Blockly.Python.quote_ = function(string) {
|
||||
// TODO: This is a quick hack. Replace with goog.string.quote
|
||||
// Can't use goog.string.quote since % must also be escaped.
|
||||
string = string.replace(/\\/g, '\\\\')
|
||||
.replace(/\n/g, '\\\n')
|
||||
.replace(/\%/g, '\\%')
|
||||
|
||||
Reference in New Issue
Block a user