Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- contentBlock.characterList.reduce((characterList, character) => {
- const previousCharacter = characterList.last();
- if (character.entity.type === previousCharacter.entity.type
- && character.entity !== previousCharacter.entity) {
- Entity.mergeData(previousCharacter.entity, character.entity.end);
- return characterList.push(
- CharacterMetadata.applyEntity(character, previousCharacter.entity)
- );
- } else {
- return characterList.push(character);
- }
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement