()
| 585 | } |
| 586 | |
| 587 | getBaseBlockAttributes() { |
| 588 | let baseBlockAttributes = this.getBlockAtIndex(0).getAttributes() |
| 589 | |
| 590 | for (let blockIndex = 1; blockIndex < this.getBlockCount(); blockIndex++) { |
| 591 | const blockAttributes = this.getBlockAtIndex(blockIndex).getAttributes() |
| 592 | const lastAttributeIndex = Math.min(baseBlockAttributes.length, blockAttributes.length) |
| 593 | |
| 594 | baseBlockAttributes = (() => { |
| 595 | const result = [] |
| 596 | for (let index = 0; index < lastAttributeIndex; index++) { |
| 597 | if (blockAttributes[index] !== baseBlockAttributes[index]) { |
| 598 | break |
| 599 | } |
| 600 | result.push(blockAttributes[index]) |
| 601 | } |
| 602 | return result |
| 603 | })() |
| 604 | } |
| 605 | |
| 606 | return baseBlockAttributes |
| 607 | } |
| 608 | |
| 609 | getAttachmentById(attachmentId) { |
| 610 | for (const attachment of this.getAttachments()) { |
no test coverage detected