use of org.eclipse.mylyn.wikitext.textile.TextileLanguage in project mylyn.docs by eclipse.
the class XslfoDocumentBuilderIntegrationTest method testCopyrightExtent.
public void testCopyrightExtent() {
documentBuilder.getConfiguration().setCopyright("Test Copyright");
parser.setMarkupLanguage(new TextileLanguage());
parser.parse("test");
assertEquals(resource("testCopyrightExtent.xml"), out.toString());
}
use of org.eclipse.mylyn.wikitext.textile.TextileLanguage in project mylyn.docs by eclipse.
the class TableOfContentsBlock method processLineContent.
@Override
public int processLineContent(String line, int offset) {
if (blockLineNumber++ > 0) {
setClosed(true);
return 0;
}
if (!getMarkupLanguage().isFilterGenerativeContents()) {
String options = matcher.group(1);
if (options != null) {
// $NON-NLS-1$
String[] optionPairs = options.split("\\s*\\|\\s*");
for (String optionPair : optionPairs) {
// $NON-NLS-1$
String[] keyValue = optionPair.split("\\s*=\\s*");
if (keyValue.length == 2) {
String key = keyValue[0].trim();
String value = keyValue[1].trim();
if (key.equals(OPTION_STYLE)) {
setStyle(value);
} else if (key.equals(OPTION_MAX_LEVEL)) {
try {
maxLevel = Integer.parseInt(value);
} catch (NumberFormatException e) {
}
} else if (key.equals(OPTION_CLASS)) {
setCssClass(value);
}
}
}
}
OutlineParser outlineParser = new OutlineParser(new TextileLanguage());
OutlineItem rootItem = outlineParser.parse(state.getMarkupContent());
emitToc(rootItem);
}
return -1;
}
Aggregations