1 package org.simantics.scl.compiler.markdown.nodes;
4 public class ItemNode extends Node {
5 public int indentation;
7 public ItemNode(int indentation) {
8 this.indentation = indentation;
12 public boolean canContain(Node node) {
16 public void toHtml(StringBuilder b) {
20 public void toHtml(StringBuilder b, boolean tight) {
21 if(firstChild == null) {
22 b.append("<li></li>\n");
27 // This code assumes that there are no consecutive paragraphs
28 boolean noNewline = true;
29 for(Node child = firstChild; child != null; child = child.next) {
30 if(child instanceof ParagraphNode) {
31 for(Node n=child.firstChild;n!=null;n=n.next)