(range)
| 528 | } |
| 529 | |
| 530 | getCommonAttributesAtRange(range) { |
| 531 | range = normalizeRange(range) |
| 532 | const [ startPosition ] = range |
| 533 | if (rangeIsCollapsed(range)) { |
| 534 | return this.getCommonAttributesAtPosition(startPosition) |
| 535 | } else { |
| 536 | const textAttributes = [] |
| 537 | const blockAttributes = [] |
| 538 | |
| 539 | this.eachBlockAtRange(range, function(block, textRange) { |
| 540 | if (textRange[0] !== textRange[1]) { |
| 541 | textAttributes.push(block.text.getCommonAttributesAtRange(textRange)) |
| 542 | return blockAttributes.push(attributesForBlock(block)) |
| 543 | } |
| 544 | }) |
| 545 | |
| 546 | return Hash.fromCommonAttributesOfObjects(textAttributes) |
| 547 | .merge(Hash.fromCommonAttributesOfObjects(blockAttributes)) |
| 548 | .toObject() |
| 549 | } |
| 550 | } |
| 551 | |
| 552 | getCommonAttributesAtPosition(position) { |
| 553 | let key, value |
nothing calls this directly
no test coverage detected