use of org.eclipse.mylyn.wikitext.parser.Attributes in project mylyn.docs by eclipse.
the class AsciiDocDocumentBuilderTest method testEntityReference.
@Test
public void testEntityReference() {
builder.beginDocument();
builder.beginBlock(BlockType.PARAGRAPH, new Attributes());
builder.characters("5 ");
builder.entityReference("gt");
builder.characters(" 4");
builder.endBlock();
builder.endDocument();
assertMarkup("5 > 4\n\n");
}
use of org.eclipse.mylyn.wikitext.parser.Attributes in project mylyn.docs by eclipse.
the class AsciiDocDocumentBuilderTest method testBlockQuoteConsecutive.
@Test
public void testBlockQuoteConsecutive() {
builder.beginDocument();
builder.beginBlock(BlockType.QUOTE, new Attributes());
builder.characters("Quote 1");
builder.endBlock();
builder.beginBlock(BlockType.QUOTE, new Attributes());
builder.characters("Quote 2");
builder.endBlock();
builder.endDocument();
assertMarkup("[quote]\n----\nQuote 1\n----\n[quote]\n----\nQuote 2\n----\n");
}
use of org.eclipse.mylyn.wikitext.parser.Attributes in project mylyn.docs by eclipse.
the class AsciiDocDocumentBuilderTest method testListWithParagraphs.
@Test
public void testListWithParagraphs() {
builder.beginDocument();
builder.beginBlock(BlockType.BULLETED_LIST, new Attributes());
builder.beginBlock(BlockType.LIST_ITEM, new Attributes());
builder.beginBlock(BlockType.PARAGRAPH, new Attributes());
builder.characters("X");
builder.endBlock();
builder.endBlock();
builder.beginBlock(BlockType.LIST_ITEM, new Attributes());
builder.beginBlock(BlockType.PARAGRAPH, new Attributes());
builder.characters("Y");
builder.endBlock();
builder.endBlock();
builder.beginBlock(BlockType.LIST_ITEM, new Attributes());
builder.beginBlock(BlockType.PARAGRAPH, new Attributes());
builder.characters("Z");
builder.endBlock();
builder.endBlock();
builder.endBlock();
builder.endDocument();
assertMarkup("* X\n\n* Y\n\n* Z\n\n");
}
use of org.eclipse.mylyn.wikitext.parser.Attributes in project mylyn.docs by eclipse.
the class AsciiDocDocumentBuilderTest method testLinkImplicitParagraph.
@Test
public void testLinkImplicitParagraph() {
builder.beginDocument();
builder.beginBlock(BlockType.PARAGRAPH, new Attributes());
builder.characters("A paragraph.");
builder.endBlock();
builder.link("http://example.com/", "A link");
builder.characters(" opens an implicit paragraph.");
builder.endDocument();
assertMarkup("A paragraph.\n\nlink:http://example.com/[A link] opens an implicit paragraph.\n\n");
}
use of org.eclipse.mylyn.wikitext.parser.Attributes in project mylyn.docs by eclipse.
the class AsciiDocDocumentBuilderTest method testPreformattedBlock.
@Test
public void testPreformattedBlock() {
builder.beginDocument();
builder.beginBlock(BlockType.PARAGRAPH, new Attributes());
builder.characters("Paragraph:");
builder.endBlock();
builder.beginBlock(BlockType.PREFORMATTED, new Attributes());
builder.characters("Code block.");
builder.endBlock();
builder.endDocument();
assertMarkup("Paragraph:\n\n[listing]\n----\nCode block.\n----\n\n");
}
Aggregations