Package net.java.textilej.parser.markup.textile

Examples of net.java.textilej.parser.markup.textile.TextileDialect


    if (builder == null) {
      throw new IllegalStateException("Must set builder");
    }
   
    MarkupParser parser = new MarkupParser();
    parser.setDialect(new TextileDialect());
    parser.setBuilder(builder);
    parser.parse(textile, asDocument);
 
View Full Code Here


*
* @author dgreen
*/
public class TextileToEclipseToc extends MarkupToEclipseToc {
  public TextileToEclipseToc() {
    setDialect(new TextileDialect());
  }
View Full Code Here

      System.exit(-1);
    }
  }

  public TextileToDocbook() {
    setDialect(new TextileDialect());
  }
View Full Code Here

          }
        }
       
        builder.setTitle(title==null?name:title);
        MarkupParser parser = new MarkupParser();
        parser.setDialect(new TextileDialect());
        parser.setBuilder(builder);
        builder.setEmitDtd(true);
       
        parser.parse(textile);
      } finally {
View Full Code Here

          protected XmlStreamWriter createXmlStreamWriter(Writer out) {
            return super.createFormattingXmlStreamWriter(out);
          }
        };
        MarkupParser parser = new MarkupParser();
        parser.setDialect(new TextileDialect());
        parser.setBuilder(builder);
        builder.setBookTitle(bookTitle==null?name:bookTitle);
        if (doctype != null) {
          builder.setDoctype(doctype);
        }
View Full Code Here

            }
          }
        }
      }
     
      OutlineParser outlineParser = new OutlineParser(new TextileDialect());
      OutlineItem rootItem = outlineParser.parse(state.getMarkupContent());
     
      emitToc(rootItem);
    }
    return -1;
View Full Code Here

    if (dialect.isEmptyLine(line)) {
      setClosed(true);
      return 0;
    }
   
    TextileDialect dialect = (TextileDialect) getDialect();
   
    // NOTE: in Textile paragraphs can have nested lists and other things, however
    //       the resulting XHTML is invalid -- so here we allow for similar constructs
    //       however we cause them to end the paragraph rather than being nested.
    for (Block block: dialect.getParagraphBreakingBlocks()) {
      if (block.canStart(line, offset)) {
        setClosed(true);
        return 0;
      }
    }

   
    if (blockLineCount != 0) {
      if (unwrapped) {
        builder.characters("\n");
      } else {
        builder.lineBreak();
      }
    }
    ++blockLineCount;
   
   
    dialect.emitMarkupLine(getParser(),state,line, offset);
   
    return -1;
  }
View Full Code Here

  private static class ThreadLocalTextileProcessor extends ThreadLocal<MarkupParser> {

    @Override
    protected MarkupParser initialValue() {

      return new MarkupParser(new TextileDialect());

    }
View Full Code Here

TOP

Related Classes of net.java.textilej.parser.markup.textile.TextileDialect

Copyright © 2018 www.massapicom. 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.