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)));