use of org.eclipse.mylyn.wikitext.parser.LinkAttributes in project mylyn.docs by eclipse.
the class TextileDocumentBuilderTest method testExternalLink.
public void testExternalLink() {
builder.beginDocument();
builder.characters("an ");
builder.link(new LinkAttributes(), "http://example.com/", "external link");
builder.characters(" test");
builder.endDocument();
String markup = out.toString();
assertEquals("an \"external link\":http://example.com/ test\n\n", markup);
}
use of org.eclipse.mylyn.wikitext.parser.LinkAttributes in project mylyn.docs by eclipse.
the class TextileDocumentBuilderTest method testLink.
public void testLink() {
builder.beginDocument();
builder.characters("a ");
builder.link(new LinkAttributes(), "#foo", "link to foo");
builder.characters(" test");
builder.endDocument();
String markup = out.toString();
assertEquals("a \"link to foo\":#foo test\n\n", markup);
}
use of org.eclipse.mylyn.wikitext.parser.LinkAttributes in project mylyn.docs by eclipse.
the class TextileDocumentBuilderTest method testImageLink.
public void testImageLink() {
builder.beginDocument();
builder.characters("a ");
builder.imageLink(new LinkAttributes(), new ImageAttributes(), "#foo", "fooImage.png");
builder.characters(" test");
builder.endDocument();
String markup = out.toString();
assertEquals("a !fooImage.png!:#foo test\n\n", markup);
}
use of org.eclipse.mylyn.wikitext.parser.LinkAttributes in project mylyn.docs by eclipse.
the class Link method emit.
@Override
public void emit(DocumentBuilder builder) {
LinkAttributes attributes = new LinkAttributes();
attributes.setTitle(title);
attributes.setHref(href);
builder.beginSpan(SpanType.LINK, attributes);
InlineParser.emit(builder, getContents());
builder.endSpan();
}
use of org.eclipse.mylyn.wikitext.parser.LinkAttributes in project mylyn.docs by eclipse.
the class AnchorLinkReplacementTokenProcessor method emit.
@Override
public void emit() {
LinkAttributes attribute = new LinkAttributes();
attribute.setId(group(1));
// $NON-NLS-1$
builder.link(attribute, null, "");
}
Aggregations