use of org.eclipse.mylyn.wikitext.textile.TextileLanguage in project mylyn.docs by eclipse.
the class HtmlDocumentBuilderIntegrationTest method setUp.
@Override
public void setUp() {
parser = new MarkupParser();
parser.setMarkupLanguage(new TextileLanguage());
out = new StringWriter();
builder = new HtmlDocumentBuilder(out);
parser.setBuilder(builder);
}
use of org.eclipse.mylyn.wikitext.textile.TextileLanguage in project mylyn.docs by eclipse.
the class FastMarkupPartitionerTest method testTextileLinkWithStyle.
public void testTextileLinkWithStyle() {
IDocument document = new Document();
FastMarkupPartitioner partitioner = new FastMarkupPartitioner();
partitioner.setMarkupLanguage(new TextileLanguage());
String markup = "\"_text_\":http://example.com";
document.set(markup);
partitioner.connect(document);
document.setDocumentPartitioner(partitioner);
int[][] expected = new int[][] { //
{ 0, markup.length() } };
ITypedRegion[] partitioning = partitioner.computePartitioning(0, document.getLength(), false);
assertPartitioningAsExpected(expected, partitioning);
}
use of org.eclipse.mylyn.wikitext.textile.TextileLanguage in project mylyn.docs by eclipse.
the class FastMarkupPartitionerTest method testTextileNestedPhraseModifiersException.
public void testTextileNestedPhraseModifiersException() {
IDocument document = new Document();
FastMarkupPartitioner partitioner = new FastMarkupPartitioner();
partitioner.setMarkupLanguage(new TextileLanguage());
document.set("a _sample *bold*_");
partitioner.connect(document);
document.setDocumentPartitioner(partitioner);
}
use of org.eclipse.mylyn.wikitext.textile.TextileLanguage in project mylyn.docs by eclipse.
the class TextileToDocbookTest method setUp.
@Override
public void setUp() {
textileToDocbook = new MarkupToDocbook();
textileToDocbook.setMarkupLanguage(new TextileLanguage());
}
use of org.eclipse.mylyn.wikitext.textile.TextileLanguage in project mylyn.docs by eclipse.
the class SplittingHtmlDocumentBuilderTest method generateContents.
private void generateContents(String markup, boolean embeddedTableOfContents) throws IOException, FileNotFoundException {
try (OutputStreamWriter out = new OutputStreamWriter(new FileOutputStream(outputFile), StandardCharsets.UTF_8)) {
rootBuilder = new HtmlDocumentBuilder(out, true);
SplittingOutlineParser outlineParser = new SplittingOutlineParser();
outlineParser.setMarkupLanguage(new TextileLanguage());
outlineParser.setSplittingStrategy(new DefaultSplittingStrategy());
SplitOutlineItem outline = outlineParser.parse(markup);
outline.setSplitTarget(outputFile.getName());
builder.setEmbeddedTableOfContents(embeddedTableOfContents);
builder.setRootBuilder(rootBuilder);
builder.setRootFile(outputFile);
builder.setFormatting(true);
builder.setOutline(outline);
MarkupParser parser = new MarkupParser(new TextileLanguage());
parser.setBuilder(builder);
parser.parse(markup);
}
}
Aggregations