use of org.eclipse.mylyn.wikitext.parser.Attributes in project mylyn.docs by eclipse.
the class AsciiDocDocumentBuilderTest method testUnsupportedBlock.
@Test
public void testUnsupportedBlock() {
builder.beginDocument();
builder.beginBlock(BlockType.FOOTNOTE, new Attributes());
builder.characters("unsupported");
builder.endBlock();
builder.endDocument();
assertMarkup("unsupported\n\n");
}
use of org.eclipse.mylyn.wikitext.parser.Attributes in project mylyn.docs by eclipse.
the class AsciiDocDocumentBuilderTest method testBlockQuoteNestedList.
@Test
public void testBlockQuoteNestedList() {
builder.beginDocument();
builder.beginBlock(BlockType.QUOTE, new Attributes());
builder.beginHeading(2, new Attributes());
builder.characters("Header.");
builder.endHeading();
builder.beginBlock(BlockType.BULLETED_LIST, new Attributes());
builder.beginBlock(BlockType.LIST_ITEM, new Attributes());
builder.characters("First item.");
builder.endBlock();
builder.beginBlock(BlockType.LIST_ITEM, new Attributes());
builder.characters("Second item.");
builder.endBlock();
builder.endBlock();
builder.beginBlock(BlockType.PARAGRAPH, new Attributes());
builder.characters("Lorem Ipsum");
builder.endBlock();
builder.endBlock();
builder.endDocument();
assertMarkup("[quote]\n----\n== Header.\n\n* First item.\n* Second item.\n\nLorem Ipsum\n\n\n----\n");
}
use of org.eclipse.mylyn.wikitext.parser.Attributes in project mylyn.docs by eclipse.
the class AsciiDocDocumentBuilderTest method testListItemWithHangingParagraph.
@Test
public void testListItemWithHangingParagraph() {
builder.beginDocument();
builder.beginBlock(BlockType.BULLETED_LIST, new Attributes());
builder.beginBlock(BlockType.LIST_ITEM, new Attributes());
builder.beginBlock(BlockType.PARAGRAPH, new Attributes());
builder.characters("List item with two paragraphs.");
builder.endBlock();
builder.beginBlock(BlockType.PARAGRAPH, new Attributes());
builder.characters("Second paragraph.");
builder.endBlock();
builder.endBlock();
builder.beginBlock(BlockType.LIST_ITEM, new Attributes());
builder.characters("Simple list item.");
builder.endBlock();
builder.endBlock();
builder.endDocument();
assertMarkup("* List item with two paragraphs.\n\nSecond paragraph.\n\n* Simple list item.\n");
}
use of org.eclipse.mylyn.wikitext.parser.Attributes in project mylyn.docs by eclipse.
the class AsciiDocDocumentBuilderTest method testParagraph.
@Test
public void testParagraph() {
builder.beginDocument();
builder.beginBlock(BlockType.PARAGRAPH, new Attributes());
builder.characters("A paragraph ends when a blank line begins!");
builder.endBlock();
builder.endDocument();
assertMarkup("A paragraph ends when a blank line begins!\n\n");
}
use of org.eclipse.mylyn.wikitext.parser.Attributes in project mylyn.docs by eclipse.
the class AsciiDocDocumentBuilderTest method testDiv.
@Test
public void testDiv() {
builder.beginDocument();
builder.beginBlock(BlockType.DIV, new Attributes());
builder.characters("A div.");
builder.endBlock();
builder.endDocument();
assertMarkup("A div.");
}
Aggregations