From: David ‘Bombe’ Roden Date: Thu, 9 Jun 2011 10:16:47 +0000 (+0200) Subject: Include the link titles in the generated text. X-Git-Tag: 0.6.5^2~8^2~2 X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=15d615074733889c8e1553581a2cae2846070fa8;p=Sone.git Include the link titles in the generated text. --- diff --git a/src/test/java/net/pterodactylus/sone/text/SoneTextParserTest.java b/src/test/java/net/pterodactylus/sone/text/SoneTextParserTest.java index 568c466..ece45f0 100644 --- a/src/test/java/net/pterodactylus/sone/text/SoneTextParserTest.java +++ b/src/test/java/net/pterodactylus/sone/text/SoneTextParserTest.java @@ -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();