Include the link titles in the generated text.
authorDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Thu, 9 Jun 2011 10:16:47 +0000 (12:16 +0200)
committerDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Thu, 9 Jun 2011 10:16:47 +0000 (12:16 +0200)
src/test/java/net/pterodactylus/sone/text/SoneTextParserTest.java

index 568c466..ece45f0 100644 (file)
@@ -88,10 +88,10 @@ public class SoneTextParserTest extends TestCase {
                                text.append(((PlainTextPart) part).getText());
                        } else if (part instanceof FreenetLinkPart) {
                                FreenetLinkPart freenetLinkPart = (FreenetLinkPart) part;
-                               text.append('[').append(freenetLinkPart.getLink()).append('|').append(freenetLinkPart.isTrusted() ? "trusted|" : "").append(freenetLinkPart.getText()).append(']');
+                               text.append('[').append(freenetLinkPart.getLink()).append('|').append(freenetLinkPart.isTrusted() ? "trusted|" : "").append(freenetLinkPart.getTitle()).append('|').append(freenetLinkPart.getText()).append(']');
                        } else if (part instanceof LinkPart) {
                                LinkPart linkPart = (LinkPart) part;
-                               text.append('[').append(linkPart.getLink()).append('|').append(linkPart.getText()).append(']');
+                               text.append('[').append(linkPart.getLink()).append('|').append(linkPart.getTitle()).append('|').append(linkPart.getText()).append(']');
                        }
                }
                return text.toString();