Package net.java.textilej.parser.markup.confluence

Examples of net.java.textilej.parser.markup.confluence.ConfluenceDialect


         
    if (!getDialect().isFilterGenerativeContents()) {
      String options = matcher.group(1);
      setOptions(options);
     
      OutlineParser outlineParser = new OutlineParser(new ConfluenceDialect());
      OutlineItem rootItem = outlineParser.parse(state.getMarkupContent());
      emitToc(rootItem);
    }
    return -1;
  }
View Full Code Here


      return 0;
    }
   
    ++blockLineCount;
   
    ConfluenceDialect dialect = (ConfluenceDialect) 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;
      }
    }
   
    Matcher blockStartMatcher = confluenceBlockStart.matcher(line);
    if (offset > 0) {
      blockStartMatcher.region(offset, line.length());
    }
    if (blockStartMatcher.find()) {
      int end = blockStartMatcher.start();
      if (end > offset) {
        dialect.emitMarkupLine(getParser(),state,offset,line.substring(offset,end), 0);   
      }
      setClosed(true);
      return end;
    }
    if (blockLineCount > 1) {
      builder.lineBreak();
    }
    dialect.emitMarkupLine(getParser(),state,line, offset);
   
    return -1;
  }
View Full Code Here

            return 0;
        }

        ++blockLineCount;

        ConfluenceDialect myDialect = (ConfluenceDialect) 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 : myDialect.getParagraphBreakingBlocks()) {
            if (block.canStart(line, offset)) {
                setClosed(true);
                return 0;
            }
        }

        if (blockLineCount > 1) {
            builder.lineBreak();
        }
        myDialect.emitMarkupLine(getParser(), state, line, offset);

        return -1;
    }
View Full Code Here

  private static class ThreadLocalConfluenceProcessor extends ThreadLocal<MarkupParser> {

    @Override
    protected MarkupParser initialValue() {

      return new MarkupParser(new ConfluenceDialect());

    }
View Full Code Here

            return 0;
        }

        ++blockLineCount;

        ConfluenceDialect dialect = (ConfluenceDialect) 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 > 1) {
            builder.lineBreak();
        }
        dialect.emitMarkupLine(getParser(), state, line, offset);

        return -1;
    }
View Full Code Here

TOP

Related Classes of net.java.textilej.parser.markup.confluence.ConfluenceDialect

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.