mirror of
https://github.com/google/blockly.git
synced 2026-01-09 01:50:11 +01:00
chore(generators): Don't add unnecessary escapes (#6161)
Closure Compiler was complaining about unnecessary backslashes in template literals, so remove them.
This commit is contained in:
committed by
GitHub
parent
91b570ace5
commit
3e19aded39
@@ -34,7 +34,7 @@ def ${Python.FUNCTION_NAME_PLACEHOLDER_}(r, g, b):
|
||||
r = round(min(100, max(0, r)) * 2.55)
|
||||
g = round(min(100, max(0, g)) * 2.55)
|
||||
b = round(min(100, max(0, b)) * 2.55)
|
||||
return \'#%02x%02x%02x\' % (r, g, b)
|
||||
return '#%02x%02x%02x' % (r, g, b)
|
||||
`);
|
||||
const r = Python.valueToCode(block, 'RED', Python.ORDER_NONE) || 0;
|
||||
const g = Python.valueToCode(block, 'GREEN', Python.ORDER_NONE) || 0;
|
||||
@@ -54,7 +54,7 @@ def ${Python.FUNCTION_NAME_PLACEHOLDER_}(colour1, colour2, ratio):
|
||||
r = round(r1 * (1 - ratio) + r2 * ratio)
|
||||
g = round(g1 * (1 - ratio) + g2 * ratio)
|
||||
b = round(b1 * (1 - ratio) + b2 * ratio)
|
||||
return \'#%02x%02x%02x\' % (r, g, b)
|
||||
return '#%02x%02x%02x' % (r, g, b)
|
||||
`);
|
||||
const colour1 =
|
||||
Python.valueToCode(block, 'COLOUR1', Python.ORDER_NONE) || '\'#000000\'';
|
||||
|
||||
Reference in New Issue
Block a user