X-Git-Url: http://git.nikiroo.be/?a=blobdiff_plain;f=src%2Fbe%2Fnikiroo%2Fgofetch%2Foutput%2FHtml.java;h=33c99c81f8874d4a8b249dddee43e0f56ff69a0c;hb=27008a8782c0ed96e07c8dc39ff0ed1f5163a9d0;hp=5b022d1f8789224a1ea11514bc55ac42da01b47f;hpb=bb0d9eb242c303df073dc80d39e24b8b10c1dddb;p=gofetch.git diff --git a/src/be/nikiroo/gofetch/output/Html.java b/src/be/nikiroo/gofetch/output/Html.java index 5b022d1..33c99c8 100644 --- a/src/be/nikiroo/gofetch/output/Html.java +++ b/src/be/nikiroo/gofetch/output/Html.java @@ -18,13 +18,20 @@ public class Html extends Output { String gopherUrl = "gopher://" + hostname + sel + ":" + port; - return "

News

\n"// + StringBuilder builder = new StringBuilder(); + appendPre(builder); + + builder.append("

News

\n"// + "

You will find here a few pages full of news, mirroring " + gopherUrl + ".

\n"// + "

They are simply scrapped from their associated webpage and updated a few times a day.

\n"// - ; + ); + + appendPost(builder); + + return builder.toString(); } @Override @@ -76,6 +83,9 @@ public class Html extends Output { builder.append("\n"); builder.append(" \n"); builder.append(" \n"); + builder.append(" \n"); builder.append("\n"); builder.append("\n"); } @@ -91,8 +101,11 @@ public class Html extends Output { .append("\n"); builder.append(space).append("
") .append(comment.getAuthor()).append("
\n"); - builder.append(space).append("
") - .append(comment.getContent()).append("
\n"); + builder.append(space).append("
"); + for (String line : comment.getContentLines()) { + builder.append("

" + line + "

"); + } + builder.append("
\n"); for (Comment subComment : comment) { appendHtml(builder, subComment, space + " "); } @@ -123,7 +136,7 @@ public class Html extends Output { builder.append("
\n"); } - builder.append("
\n"); + builder.append("
\n"); if (resume) { builder.append(" " + story.getContent() + "\n"); } else {