1 package org.simantics.scl.compiler.markdown.nodes;
4 public class ListNode extends Node {
5 public char bulletChar;
9 public ListNode(char bulletChar) {
10 this.bulletChar = bulletChar;
13 public ListNode(char bulletChar, int start) {
14 this.bulletChar = bulletChar;
19 public boolean canContain(Node node) {
20 return node instanceof ItemNode;
23 public boolean isCompatible(char bulletChar) {
24 return bulletChar == this.bulletChar;
28 public void toHtml(StringBuilder b) {
29 if(bulletChar == '+' || bulletChar == '-' || bulletChar == '*') {
31 for(Node child = firstChild; child != null; child = child.next)
32 ((ItemNode)child).toHtml(b, tight);
39 b.append("<ol start=\"").append(start).append("\">\n");
40 for(Node child = firstChild; child != null; child = child.next)
41 ((ItemNode)child).toHtml(b, tight);