static boolean paragraphBreakingBlockMatches(MarkupLanguage language, String line, int offset) { ConfluenceLanguage markupLanguage = (ConfluenceLanguage) language; for (Block block : markupLanguage.getParagraphBreakingBlocks()) { if (block.canStart(line, offset)) { return true; } } return false; } }
public Block startBlock(String line, int lineOffset) { if (isEmptyLine(line)) { // nothing starts on an empty line return null; } for (Block block : getBlocks()) { if (block.canStart(line, lineOffset)) { Block clone = block.clone(); if (clone == null) { // Special case for TableBlock: // Must not be cloned because 'canStart' needs // to be aware of the table state. return block; } return clone; } } return null; }
if (block.canStart(line, offset)) { setClosed(true); return 0;
if (block.canStart(line, offset)) { setClosed(true); return 0;
ConfluenceLanguage markupLanguage = (ConfluenceLanguage) getMarkupLanguage(); for (Block block : markupLanguage.getNestedBlocks()) { if (block.canStart(content, 0)) { nestedBlock = block.clone(); nestedBlock.setParser(getParser());
ConfluenceLanguage markupLanguage = (ConfluenceLanguage) getMarkupLanguage(); for (Block block : markupLanguage.getNestingBlocks()) { if (block.canStart(content, 0)) { nestedBlock = block.clone(); nestedBlock.setParser(getParser());
@Override public int processLineContent(String line, int offset) { if (blockLineCount == 0) { Attributes attributes = new Attributes(); builder.beginBlock(BlockType.PARAGRAPH, attributes); } if (markupLanguage.isEmptyLine(line)) { setClosed(true); return 0; } TWikiLanguage textileLanguage = (TWikiLanguage) getMarkupLanguage(); for (Block block : textileLanguage.getParagraphBreakingBlocks()) { if (block.canStart(line, offset)) { setClosed(true); return 0; } } if (blockLineCount != 0) { builder.lineBreak(); } ++blockLineCount; textileLanguage.emitMarkupLine(getParser(), state, line, offset); return -1; }
@Override public int processLineContent(String line, int offset) { if (blockLineCount == 0) { Attributes attributes = new Attributes(); builder.beginBlock(BlockType.PARAGRAPH, attributes); } if (markupLanguage.isEmptyLine(line)) { setClosed(true); return -1; } ++blockLineCount; TracWikiLanguage markupLanguage = (TracWikiLanguage) getMarkupLanguage(); // paragraphs can have nested lists and other things for (Block block : markupLanguage.getParagraphBreakingBlocks()) { if (block.canStart(line, offset)) { setClosed(true); return 0; } } if (blockLineCount != 1) { // note: newlines don't automatically convert to line breaks builder.characters("\n"); //$NON-NLS-1$ } markupLanguage.emitMarkupLine(getParser(), state, line, offset); return -1; }
@Override public int processLineContent(String line, int offset) { if (blockLineCount == 0) { Attributes attributes = new Attributes(); builder.beginBlock(BlockType.PARAGRAPH, attributes); } if (markupLanguage.isEmptyLine(line)) { setClosed(true); return -1; } ++blockLineCount; TracWikiLanguage markupLanguage = (TracWikiLanguage) getMarkupLanguage(); // paragraphs can have nested lists and other things for (Block block : markupLanguage.getParagraphBreakingBlocks()) { if (block.canStart(line, offset)) { setClosed(true); return 0; } } if (blockLineCount != 1) { // note: newlines don't automatically convert to line breaks builder.characters("\n"); //$NON-NLS-1$ } markupLanguage.emitMarkupLine(getParser(), state, line, offset); return -1; }