use of org.eclipse.mylyn.wikitext.parser.Attributes in project mylyn.docs by eclipse.
the class TextileDocumentBuilderTest method testBoldSpanNoWhitespace_spanAtLineEnd.
public void testBoldSpanNoWhitespace_spanAtLineEnd() {
builder.beginDocument();
builder.beginBlock(BlockType.PARAGRAPH, new Attributes());
builder.characters("text3");
builder.beginSpan(SpanType.BOLD, new Attributes());
builder.characters("text2");
builder.endSpan();
builder.endBlock();
builder.endDocument();
String markup = out.toString();
assertEquals("text3 **text2**\n\n", markup);
}
use of org.eclipse.mylyn.wikitext.parser.Attributes in project mylyn.docs by eclipse.
the class TextileDocumentBuilderTest method testLineBreakInPreformatted_Extended.
public void testLineBreakInPreformatted_Extended() {
builder.beginDocument();
builder.beginBlock(BlockType.PREFORMATTED, new Attributes());
builder.characters("line");
builder.lineBreak();
builder.lineBreak();
builder.characters("break");
builder.endBlock();
builder.endDocument();
String markup = out.toString();
assertEquals("pre.. line\n\nbreak\n\n", markup);
}
use of org.eclipse.mylyn.wikitext.parser.Attributes in project mylyn.docs by eclipse.
the class TextileDocumentBuilderTest method testParagraphWithLink.
public void testParagraphWithLink() {
builder.beginDocument();
builder.beginBlock(BlockType.PARAGRAPH, new Attributes());
builder.characters("text\n\nmore text ");
final LinkAttributes attributes = new LinkAttributes();
attributes.setHref("http://example.com/foo+bar/baz.gif");
builder.beginSpan(SpanType.LINK, attributes);
builder.characters("baz");
builder.endSpan();
builder.characters(" test");
builder.endBlock();
builder.endDocument();
String markup = out.toString();
assertEquals("text more text \"baz\":http://example.com/foo+bar/baz.gif test\n\n", markup);
}
use of org.eclipse.mylyn.wikitext.parser.Attributes in project mylyn.docs by eclipse.
the class TextileDocumentBuilderTest method testDivAfterImplicitParagraph.
public void testDivAfterImplicitParagraph() {
builder.beginDocument();
builder.characters("test");
builder.beginBlock(BlockType.DIV, new Attributes());
builder.characters("more ");
builder.beginSpan(SpanType.BOLD, new Attributes());
builder.characters("text");
builder.endSpan();
builder.endBlock();
builder.beginBlock(BlockType.NUMERIC_LIST, new Attributes());
builder.beginBlock(BlockType.LIST_ITEM, new Attributes());
builder.characters("text2");
builder.endSpan();
builder.endBlock();
builder.endDocument();
String markup = out.toString();
assertEquals("test\n\nmore **text**\n\n# text2\n", markup);
}
use of org.eclipse.mylyn.wikitext.parser.Attributes in project mylyn.docs by eclipse.
the class TextileDocumentBuilderTest method testBoldSpanWithAdjacentPunctuation.
public void testBoldSpanWithAdjacentPunctuation() {
builder.beginDocument();
builder.beginBlock(BlockType.PARAGRAPH, new Attributes());
builder.beginSpan(SpanType.BOLD, new Attributes());
builder.characters("text2");
builder.endSpan();
builder.characters("!");
builder.endBlock();
builder.endDocument();
String markup = out.toString();
assertEquals("**text2**!\n\n", markup);
}
Aggregations