use of org.eclipse.mylyn.wikitext.creole.CreoleLanguage in project mylyn.docs by eclipse.
the class CreoleLanguageTest method setUp.
@Override
public void setUp() throws Exception {
super.setUp();
parser = new MarkupParser(new CreoleLanguage());
}
use of org.eclipse.mylyn.wikitext.creole.CreoleLanguage in project mylyn.docs by eclipse.
the class CreoleLanguageTest method testDiscoverable.
public void testDiscoverable() {
MarkupLanguage language = ServiceLocator.getInstance().getMarkupLanguage("Creole");
assertNotNull(language);
assertTrue(language instanceof CreoleLanguage);
}
use of org.eclipse.mylyn.wikitext.creole.CreoleLanguage in project mylyn.docs by eclipse.
the class ParagraphBlock method processLineContent.
@Override
public int processLineContent(String line, int offset) {
if (blockLineCount == 0) {
builder.beginBlock(BlockType.PARAGRAPH, new Attributes());
}
if (markupLanguage.isEmptyLine(line)) {
setClosed(true);
return 0;
}
CreoleLanguage markupLanguage = (CreoleLanguage) 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 > 0) {
// $NON-NLS-1$
builder.characters("\n");
}
++blockLineCount;
markupLanguage.emitMarkupLine(getParser(), state, line, offset);
return -1;
}
Aggregations