umd/fieldstack.js
/**
   * Generate a block tree for a given ContentBlock/decorator pair.
   */
Generate a block tree for a given ContentBlock/decorator pair.
Generate a block tree for a given ContentBlock / decorator pair .
function generate(contentState, block, decorator) {
    var textLength = block.getLength();
    if (!textLength) {
      return List$6.of(new DecoratorRange({
        start: 0,
        end: 0,
        decoratorKey: null,
        leaves: List$6.of(new LeafRange({ start: 0, end: 0 }))
      }));
    }
    var leafSets = [];
    var decorations = decorator ? decorator.getDecorations(block, contentState) : List$6(Repeat$4(null, textLength));
    var chars = block.getCharacterList();
    findRangesImmutable_1(decorations, areEqual, returnTrue, function (start, end) {
      leafSets.push(new DecoratorRange({
        start: start,
        end: end,
        decoratorKey: decorations.get(start),
        leaves: generateLeaves(chars.slice(start, end).toList(), start)
      }));
    });
    return List$6(leafSets);
  }
function generate ( contentState , block , decorator ) { var textLength = block . getLength ( ) ; if ( ! textLength ) { return List$6 . of ( new DecoratorRange ( { start : 0 , end : 0 , decoratorKey : null , leaves : List$6 . of ( new LeafRange ( { start : 0 , end : 0 } ) ) } ) ) ; } var leafSets = [ ] ; var decorations = decorator ? decorator . getDecorations ( block , contentState ) : List$6 ( Repeat$4 ( null , textLength ) ) ; var chars = block . getCharacterList ( ) ; findRangesImmutable_1 ( decorations , areEqual , returnTrue , function ( start , end ) { leafSets . push ( new DecoratorRange ( { start : start , end : end , decoratorKey : decorations . get ( start ) , leaves : generateLeaves ( chars . slice ( start , end ) . toList ( ) , start ) } ) ) ; } ) ; return List$6 ( leafSets ) ; }
Generate a block tree for a given ContentBlock/decorator pair.
Generate a block tree for a given ContentBlock / decorator pair .