for ( int i = 0; i < text.length; i++ )
{
List<Block> textBlocks = new ArrayList<Block>();
textBlocks.add( ( ( ParagraphBlockParser) paragraphParser )
.visit( text[i], new ByLineReaderSource( new StringReader( EMPTY_STRING ) ), false ) );
List<Block> blocks = new ArrayList<Block>();
blocks.add( new BoldBlock( textBlocks ) );
cells.add( new TableCellHeaderBlock( blocks ) );
}
}
else
{
int it = 0;
String[] text = StringUtils.split( l, "|" );
List<String> texts = new LinkedList<String>();
while ( it < text.length )
{
if ( text[it].matches( ANY_CHARACTER + ESCAPE_CHARACTER
+ ConfluenceMarkup.LINK_START_MARKUP + ANY_CHARACTER )
&& !text[it].matches( ANY_CHARACTER + ESCAPE_CHARACTER
+ ConfluenceMarkup.LINK_END_MARKUP + ANY_CHARACTER ) )
{
texts.add( text[it] + ConfluenceMarkup.TABLE_CELL_MARKUP + text[it + 1] );
it += 2;
continue;
}
texts.add( text[it] );
it++;
}
Object[] pText = texts.toArray();
for ( int i = 0; i < pText.length; i++ )
{
List<Block> blocks = new ArrayList<Block>();
blocks.add( ( (ParagraphBlockParser) paragraphParser ).visit( (String) pText[i],
new ByLineReaderSource( new StringReader( EMPTY_STRING ) ), false ) );
cells.add( new TableCellBlock( blocks ) );
}
}