use of org.eclipse.mylyn.wikitext.confluence.ConfluenceLanguage in project mylyn.docs by eclipse.
the class FastMarkupPartitionerTest method testConfluenceTipException_bug273100.
/**
* test for bug 273100
*/
public void testConfluenceTipException_bug273100() {
IDocument document = new Document();
FastMarkupPartitioner partitioner = new FastMarkupPartitioner();
partitioner.setMarkupLanguage(new ConfluenceLanguage());
document.set("{tip}\ntext1\n\ntext2\n\ntext3\n{tip}\ntext4\n");
partitioner.connect(document);
document.setDocumentPartitioner(partitioner);
}
use of org.eclipse.mylyn.wikitext.confluence.ConfluenceLanguage in project mylyn.docs by eclipse.
the class FastMarkupPartitionerTest method testConfluenceColor.
/**
* test color
*/
public void testConfluenceColor() {
IDocument document = new Document();
FastMarkupPartitioner partitioner = new FastMarkupPartitioner();
partitioner.setMarkupLanguage(new ConfluenceLanguage());
document.set("{color:red}\ntext1\n\ntext2{color}\ntext3\n");
// ...........012345678901.234567.8.9012345678901.234567.
// .....................10...........20.........30.......
partitioner.connect(document);
document.setDocumentPartitioner(partitioner);
// MarkupPartition(type=DIV,offset=0,length=12,end=12)
// MarkupPartition(type=PARAGRAPH,offset=12,length=7,end=19)
// MarkupPartition(type=PARAGRAPH,offset=19,length=13,end=32)
// MarkupPartition(type=PARAGRAPH,offset=32,length=6,end=38)
int[][] expected = new int[][] { //
{ 0, 12 }, //
{ 12, 7 }, //
{ 19, 13 }, //
{ 32, 6 } };
ITypedRegion[] partitioning = partitioner.computePartitioning(0, document.getLength(), false);
assertPartitioningAsExpected(expected, partitioning);
}
use of org.eclipse.mylyn.wikitext.confluence.ConfluenceLanguage in project mylyn.docs by eclipse.
the class DocBookDocumentBuilderIntegrationTest method testInlineQuote.
public void testInlineQuote() {
parser.setMarkupLanguage(new ConfluenceLanguage());
parser.parse("some text {quote}quoted text{quote} some text");
String docbook = out.toString();
String expectedContent = "<para>some text <quote>quoted text</quote> some text</para>";
assertEquals(DOCBOOK_BEGIN + expectedContent + DOCBOOK_END, docbook);
}
Aggregations