getBlockContent - Function returns block content

@param tokens
@param type
@param markup
@param start
@returns {{type: *, content, markup: *}}
164833
function getBlockContent(tokens, type, markup, start = false) {
  const content = {
    type,
    content: processBlockTokens(tokens.slice(1, -1)), // eslint-disable-line
    markup
  };
  if (start) {
    content.start = start;
  }
  return content;
}
563281
protected function getContent(array $tokens, int $start, int $end): string
    {
        $content = '';
        for ($i = $start; $i <= $end; $i++) {
            $content .= $tokens[$i]['content'];
        }

        return $content;
    }
793496
CssFormatter startBlock( String[] selectors ) {
        final List<CssOutput> results = state.results;
        if( blockDeep == 0 ) {
            output = null;
            CssOutput nextOutput = null;
            if( results.size() > 0 && !"@font-face".equals( selectors[0] ) ) {
                CssOutput cssOutput = results.get( results.size() - 1 );
                if( Arrays.equals( selectors, cssOutput.getSelectors() ) ) {
                    nextOutput = cssOutput;
                }
            }
            CssFormatter block;
            if( nextOutput == null ) {
                block = copy( null );
                if( selectors[0].startsWith( "@media" ) ) {
                    block.lessExtends = new LessExtendMap( state.lessExtends );
                    nextOutput = new CssMediaOutput( selectors, block.output, state.isReference, block.lessExtends );
                } else {
                    nextOutput = new CssRuleOutput( selectors, block.output, state.isReference );
                }
                results.add( nextOutput );
            } else {
                block = copy( nextOutput.getOutput() );
            }
            block.currentOutput = nextOutput;
            block.incInsets();
            block.blockDeep++;
            return block;
        } else {
            if( selectors[0].startsWith( "@media" ) ) {
                CssFormatter block = copy( null );
                block.lessExtends = new LessExtendMap( state.lessExtends );
                String[] sel = new String[]{ this.currentOutput.getSelectors()[0] + " and " + selectors[0].substring( 6 ).trim() };
                block.currentOutput = new CssMediaOutput( sel, block.output, state.isReference, block.lessExtends );
                results.add( block.currentOutput );
                block.insets.setLength( 2 );
                block.blockDeep = 1;
                return block;
            } else {
                if( blockDeep == 1 && this.currentOutput.getClass() == CssMediaOutput.class ) {
                    CssFormatter block = copy( null );
                    block.incInsets();
                    block.currentOutput = this.currentOutput;
                    ((CssMediaOutput)this.currentOutput).startBlock( selectors, block.output );
                    block.blockDeep++;
                    return block;
                } else {
                    blockDeep++;
                    startBlockImpl( selectors );
                    return this;
                }
            }
        }
    }
802640
function getBlockquoteToken(token) {
  token.content = joinArrString(parseBlockquote(token));
  token.length = getTokensLength(token.content);
  delete token.markup;
  return token;
}
1294688
@SuppressWarnings("fallthrough")
    protected void blockContent() {

        loop:
        while (bp < buflen) {
            switch (ch) {
                case '\n': case '\r': case '\f':
                    newline = true;
                    // fallthrough

                case ' ': case '\t':
                    nextChar();
                    break;

                case '&':
                    entity(null);
                    break;

                case '<':
                    html();
                    break;

                case '>':
                    newline = false;
                    nextChar();
                    break;

                case '{':
                    inlineTag(null);
                    break;

                case '@':
                    if (newline) {
                        break loop;
                    }
                    // fallthrough

                default:
                    newline = false;
                    nextChar();
            }
        }
    }
76432
function quickParseBlock() {
  const node = this.startNode();
  const prevPos = this.context.length - 1;

  node.body = [];

  do {
    this.next();
  } while (this.context.length > prevPos);

  this.next();
  return this.finishNode(node, "BlockStatement");
}
1206888
function __deserializeContent(buffer, start, options) {
	let type, data;
	({ anchor: start, value: type } = __deserializeType(buffer, start, options));
	({ anchor: start, value: data } = __deserializeData(type, buffer, start, options));
	return { anchor: start, value: data };
}
577458
@SuppressWarnings("fallthrough")
    protected List<DCTree> blockContent() {
        ListBuffer<DCTree> trees = new ListBuffer<>();
        textStart = -1;

        loop:
        while (bp < buflen) {
            switch (ch) {
                case '\n': case '\r': case '\f':
                    newline = true;
                    // fallthrough

                case ' ': case '\t':
                    nextChar();
                    break;

                case '&':
                    entity(trees);
                    break;

                case '<':
                    newline = false;
                    addPendingText(trees, bp - 1);
                    trees.add(html());
                    if (textStart == -1) {
                        textStart = bp;
                        lastNonWhite = -1;
                    }
                    break;

                case '>':
                    newline = false;
                    addPendingText(trees, bp - 1);
                    trees.add(m.at(bp).newErroneousTree(newString(bp, bp + 1), diagSource, "dc.bad.gt"));
                    nextChar();
                    if (textStart == -1) {
                        textStart = bp;
                        lastNonWhite = -1;
                    }
                    break;

                case '{':
                    inlineTag(trees);
                    break;

                case '@':
                    if (newline) {
                        addPendingText(trees, lastNonWhite);
                        break loop;
                    }
                    // fallthrough

                default:
                    newline = false;
                    if (textStart == -1)
                        textStart = bp;
                    lastNonWhite = bp;
                    nextChar();
            }
        }

        if (lastNonWhite != -1)
            addPendingText(trees, lastNonWhite);

        return trees.toList();
    }
1104129
function Token(type, tag, nesting) {
  /**
   * Token#type -> String
   *
   * Type of the token (string, e.g. "paragraph_open")
   **/
  this.type     = type;

  /**
   * Token#tag -> String
   *
   * html tag name, e.g. "p"
   **/
  this.tag      = tag;

  /**
   * Token#attrs -> Array
   *
   * Html attributes. Format: `[ [ name1, value1 ], [ name2, value2 ] ]`
   **/
  this.attrs    = null;

  /**
   * Token#map -> Array
   *
   * Source map info. Format: `[ line_begin, line_end ]`
   **/
  this.map      = null;

  /**
   * Token#nesting -> Number
   *
   * Level change (number in {-1, 0, 1} set), where:
   *
   * -  `1` means the tag is opening
   * -  `0` means the tag is self-closing
   * - `-1` means the tag is closing
   **/
  this.nesting  = nesting;

  /**
   * Token#level -> Number
   *
   * nesting level, the same as `state.level`
   **/
  this.level    = 0;

  /**
   * Token#children -> Array
   *
   * An array of child nodes (inline and img tokens)
   **/
  this.children = null;

  /**
   * Token#content -> String
   *
   * In a case of self-closing tag (code, html, fence, etc.),
   * it has contents of this tag.
   **/
  this.content  = '';

  /**
   * Token#markup -> String
   *
   * '*' or '_' for emphasis, fence string for fence, etc.
   **/
  this.markup   = '';

  /**
   * Token#info -> String
   *
   * fence infostring
   **/
  this.info     = '';

  /**
   * Token#meta -> Object
   *
   * A place for plugins to store an arbitrary data
   **/
  this.meta     = null;

  /**
   * Token#block -> Boolean
   *
   * True for block-level tokens, false for inline tokens.
   * Used in renderer to calculate line breaks
   **/
  this.block    = false;

  /**
   * Token#hidden -> Boolean
   *
   * If it's true, ignore this element when rendering. Used for tight lists
   * to hide paragraphs.
   **/
  this.hidden   = false;
}
994508
@Override
  public CharSequence getContent() {
    CharSequence _xblockexpression = null;
    {
      final Consumer<IClassAnnotation> _function = (IClassAnnotation it) -> {
        this.importType(it.getAnnotationImport());
      };
      this.getClassAnnotations().forEach(_function);
      _xblockexpression = super.getContent();
    }
    return _xblockexpression;
  }
455176
function tokenString(quote, f) {
    return function(stream, state) {
      var ch;

      if(isInString(state) && stream.current() == quote) {
        popStateStack(state);
        if(f) state.tokenize = f;
        return ret("string", "string");
      }

      pushStateStack(state, { type: "string", name: quote, tokenize: tokenString(quote, f) });

      // if we're in a string and in an XML block, allow an embedded code block
      if(stream.match("{", false) && isInXmlAttributeBlock(state)) {
        state.tokenize = tokenBase;
        return ret("string", "string"); 
      }

      
      while (ch = stream.next()) {
        if (ch ==  quote) {
          popStateStack(state);
          if(f) state.tokenize = f;
          break;
        }
        else {
          // if we're in a string and in an XML block, allow an embedded code block in an attribute
          if(stream.match("{", false) && isInXmlAttributeBlock(state)) {
            state.tokenize = tokenBase;
            return ret("string", "string"); 
          }

        }
      }
      
      return ret("string", "string");
    };
  }
579462
def textContent(self):
        '''
            
        '''

        def _collateText(curNode):
            '''
                _collateText - Recursive function to gather the "text" of all blocks

                                 in the order that they appear

                    @param curNode <AdvancedTag> - The current AdvancedTag to process

                    @return list<str> - A list of strings in order. Join using '' to obtain text
                                            as it would appear
            '''
                   
            curStrLst = []
            blocks = object.__getattribute__(curNode, 'blocks')

            for block in blocks:
                if isTagNode(block):
                    curStrLst += _collateText(block)
                else:
                    curStrLst.append(block)

            return curStrLst

        return ''.join(_collateText(self))
47052
function(nodeList, parent) {
        // Ensure that {let} nodes are always at the beginning of a containter element
        var node, contentFound = false; // true when a node different from let is found
        for (var i = 0; i < nodeList.length; i++) {
            node = nodeList[i];
            //console.log(i+":"+node.type)
            if (node.type === "comment") {
                continue;
            }
            if (node.type==="text") {
                // tolerate static white space text
                if (node.value.match(/^\s*$/)) {
                    continue;
                }
            }
            if (node.type === "let") {
                if (contentFound) {
                    // error: let must be defined before any piece of content
                    this._logError("Let statements must be defined at the beginning of a block", node);
                } else {
                    parent.needSubScope = true;
                }
            } else {
                contentFound = true;
                if (node.content) {
                    this._processNodeContent(node.content, node);
                }
                if (node.content1) {
                    this._processNodeContent(node.content1, node);
                }
                if (node.content2) {
                    this._processNodeContent(node.content2, node);
                }
            }
        }
    }
310379
protected function getThrowAnnotationIndex(array $tokens, int $docBlockStartIndex): int
    {
        foreach ($tokens[$docBlockStartIndex]['comment_tags'] as $index) {
            if ($tokens[$index]['content'] !== '@throws') {
                continue;
            }

            $throwAnnotationIndex = $index;
            while ($tokens[$throwAnnotationIndex + 1]['line'] === $tokens[$index]['line']) {
                $throwAnnotationIndex++;
            }
            $throwAnnotationIndex++;

            return $throwAnnotationIndex;
        }

        foreach ($tokens[$docBlockStartIndex]['comment_tags'] as $index) {
            if ($tokens[$index]['content'] !== '@return') {
                continue;
            }

            $throwAnnotationIndex = $this->getFirstTokenOfLine($tokens, $index);

            return $throwAnnotationIndex;
        }

        $throwAnnotationIndex = $this->getFirstTokenOfLine($tokens, $tokens[$docBlockStartIndex]['comment_closer']);

        return $throwAnnotationIndex;
    }
936323
function getMixin() {
  const type = NodeType.MixinType;
  const token = tokens[pos];
  const line = token.ln;
  const column = token.col;
  let content = [].concat(
    getAtkeyword(),
    getSC()
  );

  if (checkIdentOrInterpolation(pos))
    content = content.concat(getIdentOrInterpolation());

  content = content.concat(getSC());

  if (checkArguments(pos)) content.push(getArguments());

  content = content.concat(getSC());

  if (checkBlock(pos)) content.push(getBlock());

  return newNode(type, content, line, column);
}
694617
function getCurrentItem(opts: Options, value: Value, block?: Block): ?Block {
    const { document } = value;

    if (!block) {
        if (!value.selection.startKey) return null;
        block = value.startBlock;
    }

    const parent = document.getParent(block.key);
    return parent && parent.type === opts.typeItem ? parent : null;
}
215238
public Content getFieldsContentHeader(boolean isLastContent) {
        HtmlTree li = new HtmlTree(HtmlTag.LI);
        if (isLastContent)
            li.addStyle(HtmlStyle.blockListLast);
        else
            li.addStyle(HtmlStyle.blockList);
        return li;
    }