here we generate the actual content lines. we accumulate
 everything into @text, and we set @chunk_lines and
 @message_lines, and we update @layout.
327527
def regen_text
    @text = []
    @chunk_lines = []
    @message_lines = []
    @person_lines = []

    prevm = nil
    @thread.each do |m, depth, parent|
      unless m.is_a? Message # handle nil and :fake_root
        @text += chunk_to_lines m, nil, @text.length, depth, parent
        next
      end
      l = @layout[m]

      ## is this still necessary?
      next unless @layout[m].state # skip discarded drafts

      ## build the patina
      text = chunk_to_lines m, l.state, @text.length, depth, parent, l.color, l.star_color

      l.top = @text.length
      l.bot = @text.length + text.length # updated below
      l.prev = prevm
      l.next = nil
      l.depth = depth
      # l.state we preserve
      l.width = 0 # updated below
      @layout[l.prev].next = m if l.prev

      (0 ... text.length).each do |i|
        @chunk_lines[@text.length + i] = m
        @message_lines[@text.length + i] = m
        lw = text[i].flatten.select { |x| x.is_a? String }.map { |x| x.display_length }.sum
      end

      @text += text
      prevm = m
      if l.state != :closed
        m.chunks.each do |c|
          cl = @chunk_layout[c]

          ## set the default state for chunks
          cl.state ||=
            if c.expandable? && c.respond_to?(:initial_state)
              c.initial_state
            else
              :closed
            end

          text = chunk_to_lines c, cl.state, @text.length, depth
          (0 ... text.length).each do |i|
            @chunk_lines[@text.length + i] = c
            @message_lines[@text.length + i] = m
            lw = text[i].flatten.select { |x| x.is_a? String }.map { |x| x.display_length }.sum - (depth * @indent_spaces)
            l.width = lw if lw > l.width
          end
          @text += text
        end
        @layout[m].bot = @text.length
      end
    end
  end
866513
def capture_content
      original, @_output = output, Output.new
      yield
      original.widgets.concat(output.widgets) # todo: test!!!
      output.to_s
    ensure
      @_output = original
    end
1238815
function(n_newlines) {
				if('number' === typeof n_newlines) {
					for(let i=0; i<n_newlines; i++) {
						a_chunks.push('');
					}
				}
				else {
					a_chunks.push('');
				}
			}
825996
def adapt_outline!(parsed_outline, gathered_comments)
      # Saving off the original data
      parsed_outline['cuke_modeler_parsing_data'] = Marshal::load(Marshal.dump(parsed_outline))

      # Removing parsed data for child elements in order to avoid duplicating data
      parsed_outline['cuke_modeler_parsing_data']['tags'] = nil
      parsed_outline['cuke_modeler_parsing_data']['steps'] = nil
      parsed_outline['cuke_modeler_parsing_data']['examples'] = nil

      if parsed_outline['comments']
        parsed_outline['cuke_modeler_parsing_data']['comments'] = nil
        gathered_comments.concat(parsed_outline['comments'])
      end

      if parsed_outline['tags']
        parsed_outline['tags'].each do |tag|
          adapt_tag!(tag)
        end
      end

      if parsed_outline['steps']
        parsed_outline['steps'].each do |step|
          adapt_step!(step, gathered_comments)
        end
      end

      if parsed_outline['examples']
        parsed_outline['examples'].each do |example|
          adapt_example!(example, gathered_comments)
        end
      end
    end
1241599
private void cumulateContent(ChannelHandlerContext ctx, HttpContent msg) {
        cumulation = cumulator.cumulate(ctx.alloc(), cumulation, msg.content());
    }
1071127
def indexable_content
    load_from_source!
    [
      from && from.indexable_content,
      to.map { |p| p.indexable_content },
      cc.map { |p| p.indexable_content },
      bcc.map { |p| p.indexable_content },
      indexable_chunks.map { |c| c.lines.map { |l| l.fix_encoding! } },
      indexable_subject,
    ].flatten.compact.join " "
  end
920305
def _process_layout(self, layout):
        """"""
        # Here we just group text into paragraphs
        elements = []
        for lt_obj in layout:
            if isinstance(lt_obj, LTTextBox) or isinstance(lt_obj, LTTextLine):
                elements.append(Paragraph(lt_obj.get_text().strip()))
            elif isinstance(lt_obj, LTFigure):
                # Recursive...
                elements.extend(self._process_layout(lt_obj))
        return elements
1042478
public function generateTree()
    {
        $this->options['valid_content_extensions'] = $this->getContentExtensions();

        $this->tree = new Root($this->getParams());
        Builder::build($this->tree, $this->options['ignore']);

        // Apply the language name as Section title
        if ($this->options->isMultilanguage()) {
            foreach ($this->options['languages'] as $key => $node) {
                $this->tree->getEntries()[$key]->setTitle($node);
            }
        }

        // Enhance the tree with processors
        $this->getProcessor()->manipulateTree($this->tree);

        // Sort the tree one last time before it is finalized
        Builder::sortTree($this->tree);

        Builder::finalizeTree($this->tree);
    }
1105022
function(block) {
  switch(block.t) {
    case 'Paragraph':
    case 'SetextHeader':
    case 'ATXHeader':
      block.inline_content =
        this.inlineParser.parse(block.string_content.trim(), this.refmap);
      block.string_content = "";
      break;
    default:
      break;
  }

  if (block.children) {
    for (var i = 0; i < block.children.length; i++) {
      this.processInlines(block.children[i]);
    }
  }

}
527451
function render(content) {
  var deferred = q.defer();

  var blockType = "normal";
  var lines = content.split("\n");
  var blocks = {};
  for (var i=0; i<lines.length; i++) {
    var line = lines[i];

    if (line.substr(0,1) == "@") {
      blockType = line.substr(1).trim();
      if (blockType === "end") blockType = "normal";
      continue;
    }
    if (blocks[blockType])
      blocks[blockType] += line + "\n";
    else
      blocks[blockType] = line + "\n";
  }

  for (var key in blocks) {
    if (blocks.hasOwnProperty(key)) {
      try {
        blocks[key] = metaMarked(blocks[key]);
      } catch(err) {
        return deferred.reject(new Error(err));
      }
    }
    deferred.resolve(blocks);
  }

  return deferred.promise;
}
884450
private void updateStructure()
   {
      int id = 1;
      Integer outlineLevel = Integer.valueOf(1);
      for (Task task : m_projectFile.getChildTasks())
      {
         id = updateStructure(id, task, outlineLevel);
      }
   }
285449
private function processEntries(): void
    {
        if (empty($this->lines)) {
            return;
        }

        foreach ($this->lines as $line) {

            if ($this->isLineComment($line) || !$this->isLineSetter($line)) {
                continue;
            }

            $this->setVariable($line);
        }
    }
385669
def content_written(generator, content):
    
    url = "%s/%s" % (generator.settings.get('SITEURL', 'http://localhost:8000'), content.url)
    make_posts(generator, content.metadata, url)
834975
def _lines(self):
        

        chunkIndices = self._listChunks()
        for chunkIndex in chunkIndices:
            with self._openChunk(chunkIndex) as chunk:
                yield from chunk._lines()
36920
function () {
            var leaf;
            if (this._branch.length) {
                leaf = this._branch[this._branch.length - 1];
                if (!leaf.hasContent) {
                    this._buffer.push(">");
                    leaf.hasContent = true;
                }
            }
        }
540420
private static void addBlankLines(Content pre) {
        for (int i = 0; i < NUM_BLANK_LINES; i++) {
            pre.addContent(NEW_LINE);
        }
    }
818710
public function done()
	{
		// Compute the totall length of the output
		$length = $this->contentLength + $this->initMessageLength;

		// Back up all the way
		$this->backspace($length, true);

		// In case this gets used again...
		$this->contentLength     = 0;
		$this->initMessageLength = 0;
	}