Package com.overzealous.remark.util

Examples of com.overzealous.remark.util.BlockWriter.startBlock()


    // keep track of where we are in the list.
    int listCounter = 1;

    // we need to store this, because we're going to replace it for each li below (for padding).
    BlockWriter parentWriter = converter.output;
    parentWriter.startBlock();
    for(final Element child : node.children()) {
      // handle linebreaks between li's
      if(first) {
        first = false;
      } else {
View Full Code Here


     * To do this, we wrap the whole thing in a start/end block. Then,
     * every time we come across a dt, we end a block and start a new one.
     * The only exception to this rule is if the first node we come to is
     * a dt - then we don't do anything.
     */
    parentWriter.startBlock();
    for(final Element child : node.children()) {

      if(child.tagName().equals("dt")) {
        // print term
        if(first) {
View Full Code Here

          // the first node is a term, so we already started a block.
          first = false;
        } else {
          // add block separation between defs and next term.
          parentWriter.endBlock();
          parentWriter.startBlock();
        }
        converter.walkNodes(this, child, converter.inlineNodes);
        parentWriter.println();
        lastNodeWasDD = false;
View Full Code Here

   * @param converter Parent converter for this object.
   */
  public void handleNode(NodeHandler parent, Element node, DocumentConverter converter) {
    int depth = Integer.parseInt(node.tagName().substring(1, 2));
    BlockWriter out = converter.output;
    out.startBlock();
    StringUtils.multiply(out, '#', depth);
    out.print(' ');
    out.print(converter.getInlineContent(this, node).replace("\n", " "));
    out.print(' ');
    StringUtils.multiply(out, '#', depth);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.