1 |
|
2 |
|
3 |
|
4 |
|
5 |
|
6 |
|
7 |
|
8 |
|
9 |
|
10 |
|
11 | 'use strict';
|
12 |
|
13 | var CharacterMetadata = require("./CharacterMetadata");
|
14 |
|
15 | function applyEntityToContentBlock(contentBlock, startArg, end, entityKey) {
|
16 | var start = startArg;
|
17 | var characterList = contentBlock.getCharacterList();
|
18 |
|
19 | while (start < end) {
|
20 | characterList = characterList.set(start, CharacterMetadata.applyEntity(characterList.get(start), entityKey));
|
21 | start++;
|
22 | }
|
23 |
|
24 | return contentBlock.set('characterList', characterList);
|
25 | }
|
26 |
|
27 | module.exports = applyEntityToContentBlock; |
\ | No newline at end of file |