01: package fat;
02:
03: import fit.*;
04: import java.io.*;
05:
06: public class TextToHtmlFixture extends ColumnFixture {
07: public String Text;
08:
09: public String HTML() {
10: Text = unescapeAscii(Text);
11: return Fixture.escape(Text);
12: }
13:
14: private String unescapeAscii(String text) {
15: text = text.replaceAll("\\\\n", "\n");
16: text = text.replaceAll("\\\\r", "\r");
17: return text;
18: }
19:
20: private String GenerateOutput(Parse parse) {
21: StringWriter result = new StringWriter();
22: parse.print(new PrintWriter(result));
23: return result.toString();
24: }
25: }
|