Package net.java.textilej.parser.tag

Examples of net.java.textilej.parser.tag.BlockTagProcessor


                state.elements.push(new BlockState(builder,BlockType.TABLE,createAttributes(blockModifierMatcher,2)));
              } else {
                throw new IllegalStateException(String.format("Unexpected '%s' at line %s",modifierType,lineNumber));
              }
            } else {
              BlockTagProcessor blockProcessor;
              if (dialect != null && ((blockProcessor  = dialect.startBlock(textileLine,0)) != null)) {
                blockProcessor.setParser(this);
                blockProcessor.setParserServices(services);
                blockProcessor.setBuilder(builder);
                blockProcessor.setTextile(textile);
               
                // end any previous block
                extendedBlockType = null;
                extendedTagRequired = false;
                endBlock(state.elements);
                startedNewBlock = true;
               
                int lineOffset = blockProcessor.getLineOffset();
                if (lineOffset < textileLine.length()) {
                  String textileLineEnd = textileLine.substring(lineOffset);
                  if (textileLineEnd.trim().length() > 0) {
                    blockProcessor.process(textileLine,lineOffset);
                  }
                }
                while (!blockProcessor.isBlockClosed()) {
                  if ((textileLine = reader.readLine()) != null) {
                    ++lineNumber;
                    builder.textileLine(lineNumber,textileLine);
                               
                    blockProcessor.process(textileLine, 0);
                  } else {
                    break;
                  }
                }

                blockProcessor.closeBlock();
                lineContentProcessed = true;
                if (textileLine == null) {
                  break;
                }
                if (blockProcessor.getLineOffset() < textileLine.length()) {
                  String textileLineEnd = textileLine.substring(lineOffset);
                  if (textileLineEnd.trim().length() > 0) {
                    textileLine = textileLineEnd;
                    lineContentProcessed = false;
                    state.elements.push(new BlockState(builder,BlockType.PARAGRAPH,createAttributes(blockModifierMatcher,2)));
View Full Code Here

TOP

Related Classes of net.java.textilej.parser.tag.BlockTagProcessor

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.