Esempio n. 1
0
 public void printComments(Indent indent, PrintWriter pw) {
   for (String comment : this.comments) {
     Indent nextIndent = indent.next();
     nextIndent.print(pw);
     pw.print("<!-- ");
     pw.print(escape(comment));
     pw.print(" -->");
   }
 }
Esempio n. 2
0
 public void printContents(Indent indent, PrintWriter pw) {
   for (Object content : this.content) {
     Indent nextIndent = indent.next();
     if (content instanceof String) {
       formatted(pw, nextIndent, 60, escape((String) content));
     } else if (content instanceof Tag) {
       Tag tag = (Tag) content;
       tag.print(nextIndent, pw);
     }
   }
 }