X-Git-Url: http://git.nikiroo.be/?p=nikiroo-utils.git;a=blobdiff_plain;f=reader%2FTextOutput.java;h=732fced729b5a16d7c57e082e09ece9373ee9998;hp=60b3a7f7c1db5d5ae40b3ebe4e5cde9754817869;hb=258e065f81071a861711ef935dca3ec5563f4360;hpb=5f3671e17febc5b7f6abbfc62c66c4045d47ec8d diff --git a/reader/TextOutput.java b/reader/TextOutput.java index 60b3a7f..732fced 100644 --- a/reader/TextOutput.java +++ b/reader/TextOutput.java @@ -145,4 +145,18 @@ public class TextOutput { } return builder.toString(); } + + /** + * Convert the paragraph into HTML3 code. + * + * @param para + * the {@link Paragraph} to convert + * + * @return HTML3 code tested with Java Swing + */ + public String convert(Paragraph para) { + Chapter fakeChapter = new Chapter(0, ""); + fakeChapter.setParagraphs(Arrays.asList(para)); + return convert(fakeChapter, false); + } }