use of org.eclipse.mylyn.wikitext.tracwiki.TracWikiLanguage in project mylyn.docs by eclipse.
the class TracWikiLanguageTest method setUp.
@Override
public void setUp() {
markupLanguage = new TracWikiLanguage();
parser = new MarkupParser(markupLanguage);
}
use of org.eclipse.mylyn.wikitext.tracwiki.TracWikiLanguage in project mylyn.docs by eclipse.
the class ParagraphBlock method processLineContent.
@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
// $NON-NLS-1$
builder.characters("\n");
}
markupLanguage.emitMarkupLine(getParser(), state, line, offset);
return -1;
}
use of org.eclipse.mylyn.wikitext.tracwiki.TracWikiLanguage in project mylyn.docs by eclipse.
the class TracWikiLanguageTest method testDiscoverable.
public void testDiscoverable() {
// $NON-NLS-1$
MarkupLanguage language = ServiceLocator.getInstance().getMarkupLanguage("TracWiki");
assertNotNull(language);
assertTrue(language instanceof TracWikiLanguage);
}
Aggregations