mirror of
https://github.com/google/blockly.git
synced 2026-01-07 17:10:11 +01:00
Collapse the five 0/1-based index flags into one option.
This commit is contained in:
@@ -103,7 +103,7 @@ Blockly.Python['text_indexOf'] = function(block) {
|
||||
var text = Blockly.Python.valueToCode(block, 'VALUE',
|
||||
Blockly.Python.ORDER_MEMBER) || '\'\'';
|
||||
var code = text + '.' + operator + '(' + substring + ')';
|
||||
if (Blockly.Python.ONE_BASED_INDEXING) {
|
||||
if (block.workspace.options.oneBasedIndex) {
|
||||
return [code + ' + 1', Blockly.Python.ORDER_ADDITIVE];
|
||||
}
|
||||
return [code, Blockly.Python.ORDER_FUNCTION_CALL];
|
||||
|
||||
Reference in New Issue
Block a user