Split into multiple <pre> blocks separated by double line-break.
@param preBlock
979333
function splitIntoPres( preBlock )
	{
		// Exclude the ones at header OR at tail,
		// and ignore bookmark content between them.
		var duoBrRegex = /(\S\s*)\n(?:\s|(<span[^>]+data-cke-bookmark.*?\/span>))*\n(?!$)/gi,
			blockName = preBlock.getName(),
			splitedHtml = replace( preBlock.getOuterHtml(),
				duoBrRegex,
				function( match, charBefore, bookmark )
				{
				  return charBefore + '</pre>' + bookmark + '<pre>';
				} );

		var pres = [];
		splitedHtml.replace( /<pre\b.*?>([\s\S]*?)<\/pre>/gi, function( match, preContent ){
			pres.push( preContent );
		} );
		return pres;
	}
760338
public Block split (final Line aLine)
  {
    final Block aBlock = new Block ();

    aBlock.m_aLines = m_aLines;
    aBlock.m_aLineTail = aLine;
    m_aLines = aLine.m_aNext;
    aLine.m_aNext = null;
    if (m_aLines == null)
      m_aLineTail = null;
    else
      m_aLines.m_aPrevious = null;

    if (m_aBlocks == null)
      m_aBlocks = m_aBlockTail = aBlock;
    else
    {
      m_aBlockTail.m_aNext = aBlock;
      m_aBlockTail = aBlock;
    }

    return aBlock;
  }
114753
def getblock(lines):
    """"""
    try:
        tokenize.tokenize(ListReader(lines).readline, BlockFinder().tokeneater)
    except EndOfBlock, eob:
        return lines[:eob.args[0]]
    # Fooling the indent/dedent logic implies a one-line definition
    return lines[:1]
1143813
function(block){
    var escapePrettyMode = this.escapePrettyMode;
    var pp = this.pp;
    var ast = [];
    // Pretty print multi-line text
    if (pp && block.nodes.length > 1 && !escapePrettyMode &&
        block.nodes[0].type === 'Text' && block.nodes[1].type === 'Text' ) {
      push.apply(ast, this.prettyIndent(1, true));
    }
    for (var i = 0; i < block.nodes.length; ++i) {
      // Pretty print text
      if (pp && i > 0 && !escapePrettyMode &&
          block.nodes[i].type === 'Text' && block.nodes[i-1].type === 'Text' &&
          /\n$/.test(block.nodes[i - 1].val)) {
        push.apply(ast,this.prettyIndent(1, false));
      }
      push.apply(ast, this.visit(block.nodes[i], block));
    }
    return ast;
  }
854361
public static void setContainerBlockInputs(RuleBuildContext context,
                                                List<JavaBlockDescr> descrs,
                                                JavaContainerBlockDescr parentBlock,
                                                String originalCode,
                                                BoundIdentifiers bindings,
                                                Map<String, Class<?>> parentVars,
                                                int offset) {
        StringBuilder consequence = new StringBuilder();
        int lastAdded = 0;

        // strip blocks, so we can analyse this block with MVEL
        for (JavaBlockDescr block : parentBlock.getJavaBlockDescrs()) {
            if (block.getEnd() == 0) {
                // do nothing, it was incorrectly parsed, but this error should be picked up else where
                continue;
            }

            if (block.getType() == JavaBlockDescr.BlockType.TRY) {
                // adding previous chunk up to the start of this block
                consequence.append(originalCode.substring(lastAdded,
                        block.getStart() - 1 - offset));
                JavaTryBlockDescr tryDescr = (JavaTryBlockDescr) block;
                if (tryDescr.getFinal() != null) {
                    lastAdded = tryDescr.getFinal().getEnd() - offset;
                } else {
                    lastAdded = tryDescr.getCatches().get(tryDescr.getCatches().size() - 1).getEnd() - offset;
                }

                stripTryDescr(originalCode,
                        consequence,
                        (JavaTryBlockDescr) block,
                        offset);
            } else if (block.getType() == JavaBlockDescr.BlockType.THROW) {
                // adding previous chunk up to the start of this block
                consequence.append(originalCode.substring(lastAdded,
                        block.getStart() - 1 - offset));

                JavaThrowBlockDescr throwBlock = (JavaThrowBlockDescr) block;
                addWhiteSpaces(originalCode, consequence, throwBlock.getStart() - offset, throwBlock.getTextStart() - offset);
                consequence.append(originalCode.substring(throwBlock.getTextStart() - offset - 1, throwBlock.getEnd() - 1 - offset)).append(";");
                lastAdded = throwBlock.getEnd() - offset;
            } else if (block.getType() == JavaBlockDescr.BlockType.IF) {
                // adding previous chunk up to the start of this block
                consequence.append(originalCode.substring(lastAdded,
                        block.getStart() - 1 - offset));
                JavaIfBlockDescr ifDescr = (JavaIfBlockDescr) block;
                lastAdded = ifDescr.getEnd() - offset;
                stripBlockDescr(originalCode,
                                consequence,
                                ifDescr,
                                offset);
            } else if (block.getType() == JavaBlockDescr.BlockType.ELSE) {
                // adding previous chunk up to the start of this block
                consequence.append(originalCode.substring(lastAdded,
                        block.getStart() - 1 - offset));
                JavaElseBlockDescr elseDescr = (JavaElseBlockDescr) block;
                lastAdded = elseDescr.getEnd() - offset;
                stripBlockDescr(originalCode,
                                consequence,
                                elseDescr,
                                offset);
            } else if (block.getType() == JavaBlockDescr.BlockType.WHILE) {
                // adding previous chunk up to the start of this block
                consequence.append(originalCode.substring(lastAdded,
                        block.getStart() - 1 - offset));
                JavaWhileBlockDescr whileDescr = (JavaWhileBlockDescr) block;
                lastAdded = whileDescr.getEnd() - offset;
                stripBlockDescr(originalCode,
                                consequence,
                                whileDescr,
                                offset);
            } else if (block.getType() == JavaBlockDescr.BlockType.FOR) {
                // adding previous chunk up to the start of this block
                consequence.append(originalCode.substring(lastAdded,
                        block.getStart() - 1 - offset));
                JavaForBlockDescr forDescr = (JavaForBlockDescr) block;
                lastAdded = forDescr.getEnd() - offset;
                stripBlockDescr(originalCode,
                                consequence,
                                forDescr,
                                offset);
            }
        }
        consequence.append(originalCode.substring(lastAdded));

        // We need to do this as MVEL doesn't recognise "modify"
        MacroProcessor macroProcessor = new MacroProcessor();
        Map<String, Macro> macros = new HashMap<String, Macro>(MVELConsequenceBuilder.macros);
        macros.put("modify",
                new Macro() {
                    public String doMacro() {
                        return "with  ";
                    }
                });
        macroProcessor.setMacros(macros);
        String mvelCode = macroProcessor.parse(consequence.toString());


        Map<String, Class<?>> inputs = getInputs(context, mvelCode, bindings, parentVars);
        inputs.putAll(parentVars);
        parentBlock.setInputs(inputs);

        // now go depth, set inputs for each nested container
        // set inputs for current container blocks to be rewritten
        for (JavaBlockDescr block : parentBlock.getJavaBlockDescrs()) {
            if (block.getType() == JavaBlockDescr.BlockType.TRY) {
                JavaTryBlockDescr tryBlock = (JavaTryBlockDescr) block;
                setContainerBlockInputs(context,
                        descrs,
                        tryBlock,
                        originalCode.substring(tryBlock.getTextStart() - offset, tryBlock.getEnd() - 1 - offset),
                        bindings,
                        inputs,
                        tryBlock.getTextStart());
                for (JavaCatchBlockDescr catchBlock : tryBlock.getCatches()) {
                    setContainerBlockInputs(context,
                            descrs,
                            catchBlock,
                            catchBlock.getClause() + "=null;" + originalCode.substring(catchBlock.getTextStart() - offset, catchBlock.getEnd() - 1 - offset),
                            bindings,
                            inputs,
                            tryBlock.getTextStart());
                }

                if (tryBlock.getFinal() != null) {
                    JavaFinalBlockDescr finalBlock = tryBlock.getFinal();
                    setContainerBlockInputs(context,
                            descrs,
                            finalBlock,
                            originalCode.substring(finalBlock.getTextStart() - offset, finalBlock.getEnd() - 1 - offset),
                            bindings,
                            inputs,
                            tryBlock.getTextStart());
                }
            } else if (block.getType() == JavaBlockDescr.BlockType.IF) {
                JavaIfBlockDescr ifBlock = (JavaIfBlockDescr) block;
                int adjustBlock = (originalCode.charAt(ifBlock.getTextStart() - offset - 1) == '{') ? 0 : 1;
                setContainerBlockInputs(context,
                        descrs,
                        ifBlock,
                        originalCode.substring(ifBlock.getTextStart() - offset + adjustBlock, ifBlock.getEnd() - 1 - offset - adjustBlock),
                        bindings,
                        inputs,
                        ifBlock.getTextStart());
            } else if (block.getType() == JavaBlockDescr.BlockType.ELSE) {
                JavaElseBlockDescr elseBlock = (JavaElseBlockDescr) block;
                int adjustBlock = (originalCode.charAt(elseBlock.getTextStart() - offset - 1) == '{') ? 0 : 1;
                setContainerBlockInputs(context,
                        descrs,
                        elseBlock,
                        originalCode.substring(elseBlock.getTextStart() - offset + adjustBlock, elseBlock.getEnd() - 1 - offset - adjustBlock),
                        bindings,
                        inputs,
                        elseBlock.getTextStart());
            } else if (block.getType() == JavaBlockDescr.BlockType.WHILE) {
                JavaWhileBlockDescr whileBlock = (JavaWhileBlockDescr) block;
                int adjustBlock = (originalCode.charAt(whileBlock.getTextStart() - offset - 1) == '{') ? 0 : 1;
                setContainerBlockInputs(context,
                        descrs,
                        whileBlock,
                        originalCode.substring(whileBlock.getTextStart() - offset + adjustBlock, whileBlock.getEnd() - 1 - offset - adjustBlock),
                        bindings,
                        inputs,
                        whileBlock.getTextStart());
            } else if (block.getType() == JavaBlockDescr.BlockType.FOR) {
                JavaForBlockDescr forBlock = (JavaForBlockDescr) block;
                int adjustBlock = (originalCode.charAt(forBlock.getTextStart() - offset - 1) == '{') ? 0 : 1;
                setContainerBlockInputs(context,
                        descrs,
                        forBlock,
                        originalCode.substring(forBlock.getStartParen() - offset, forBlock.getInitEnd() - offset) +
                                originalCode.substring(forBlock.getTextStart() - offset + adjustBlock, forBlock.getEnd() - 1 - offset - adjustBlock),
                        bindings,
                        inputs,
                        forBlock.getTextStart() - (forBlock.getInitEnd() - forBlock.getStartParen()));
            } else {
                block.setInputs(inputs); // each block to be rewritten now knows it's own variables
                descrs.add(block);
            }
        }
    }
784597
public Spliterator.OfInt statesInBlockSpliterator(Block b) {
        return Arrays.spliterator(blockData, b.low, b.high);
    }
852280
public void setBlocks(java.util.Collection<Block> blocks) {
        if (blocks == null) {
            this.blocks = null;
            return;
        }

        this.blocks = new java.util.ArrayList<Block>(blocks);
    }
1091724
public static void splitLine(final String line, final char delimiter,
      final String[] splitted) {
    int idxComma, idxToken = 0, fromIndex = 0;
    while ((idxComma = line.indexOf(delimiter, fromIndex)) != -1) {
      splitted[idxToken++] = line.substring(fromIndex, idxComma);
      fromIndex = idxComma + 1;
    }
    splitted[idxToken] = line.substring(fromIndex);
  }
266346
public void prewrite(byte[] b,int offset, int length)
    {
        ensureReserve(length);
        System.arraycopy(b,offset,_buf,_start-length,length);
        _start-=length;
    }
701168
private void emitLines(final StringBuilder out, final Block block)
    {
        switch (block.type)
        {
        case CODE:
            this.emitCodeLines(out, block.lines, block.meta, true);
            break;
        case FENCED_CODE:
            this.emitCodeLines(out, block.lines, block.meta, false);
            break;
        case XML:
            this.emitRawLines(out, block.lines);
            break;
        default:
            this.emitMarkedLines(out, block.lines);
            break;
        }
    }
325177
private void initListBlock(final Block root)
    {
        Line line = root.lines;
        line = line.next;
        while (line != null)
        {
            final LineType t = line.getLineType(this.config);
            if ((t == LineType.OLIST || t == LineType.ULIST)
                    || (!line.isEmpty && (line.prevEmpty && line.leading == 0 && !(t == LineType.OLIST || t == LineType.ULIST))))
            {
                root.split(line.previous).type = BlockType.LIST_ITEM;
            }
            line = line.next;
        }
        root.split(root.lineTail).type = BlockType.LIST_ITEM;
    }
1009849
protected function block(OutputBlock $block)
    {
        if (empty($block->lines) && empty($block->children)) {
            return;
        }

        $this->currentBlock = $block;

        $pre = $this->indentStr();

        if (! empty($block->selectors)) {
            $this->blockSelectors($block);

            $this->indentLevel++;
        }

        if (! empty($block->lines)) {
            $this->blockLines($block);
        }

        if (! empty($block->children)) {
            $this->blockChildren($block);
        }

        if (! empty($block->selectors)) {
            $this->indentLevel--;

            if (empty($block->children)) {
                $this->write($this->break);
            }

            $this->write($pre . $this->close . $this->break);
        }
    }
759100
private void addToSplitterQueue(Block<S, L> block) {
        ElementReference ref = splitters.referencedAdd(block);
        block.setSplitterQueueReference(ref);
    }
827795
public void setBlockers(java.util.Collection<BlockerDeclaration> blockers) {
        if (blockers == null) {
            this.blockers = null;
            return;
        }

        this.blockers = new java.util.ArrayList<BlockerDeclaration>(blockers);
    }
377469
def insert_basic_block(self, before, name=''):
        
        blk = Block(parent=self, name=name)
        self.blocks.insert(before, blk)
        return blk
385265
public static void blockMultPlus( final double[] dataA, final double []dataB, final double []dataC,
                                     int indexA, int indexB, int indexC,
                                     final int heightA, final int widthA, final int widthC) {
//        for( int i = 0; i < heightA; i++ ) {
//            for( int k = 0; k < widthA; k++ ) {
//                for( int j = 0; j < widthC; j++ ) {
//                    dataC[ i*widthC + j + indexC ] += dataA[i*widthA + k + indexA] * dataB[k*widthC + j + indexB];
//                }
//            }
//        }

        int a = indexA;
        int rowC = indexC;
        for( int i = 0; i < heightA; i++ , rowC += widthC ) {
            int b = indexB;

            final int endC = rowC + widthC;
            final int endA = a + widthA;
            while( a != endA ) {//for( int k = 0; k < widthA; k++ ) {
                double valA = dataA[a++];

                int c = rowC;

                while( c != endC  ) {//for( int j = 0; j < widthC; j++ ) {
                    dataC[ c++ ] += valA * dataB[ b++ ];
                }
            }
        }
    }
622061
private void addToPartition(Block<S, L> block) {
        ElementReference ref = partition.referencedAdd(block);
        block.setPartitionReference(ref);
    }