]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/markdown/nodes/ItemNode.java
Markdown to HTML generator has now genration options
[simantics/platform.git] / bundles / org.simantics.scl.compiler / src / org / simantics / scl / compiler / markdown / nodes / ItemNode.java
index 8217b7e968727415e47d43259f25b3a0639f354b..4e2737f2e48a004ae7b15c1ca1494d59f75ffadb 100644 (file)
@@ -1,5 +1,6 @@
 package org.simantics.scl.compiler.markdown.nodes;
 
+import org.simantics.scl.compiler.markdown.html.HtmlGenerationContext;
 
 public class ItemNode extends Node {
     public int indentation;
@@ -13,11 +14,11 @@ public class ItemNode extends Node {
         return true;
     }
 
-    public void toHtml(StringBuilder b) {
-        toHtml(b, true);
+    public void toHtml(HtmlGenerationContext context, StringBuilder b) {
+        toHtml(context, b, true);
     }
     
-    public void toHtml(StringBuilder b, boolean tight) {
+    public void toHtml(HtmlGenerationContext context, StringBuilder b, boolean tight) {
         if(firstChild == null) {
             b.append("<li></li>\n");
             return;
@@ -29,7 +30,7 @@ public class ItemNode extends Node {
             for(Node child = firstChild; child != null; child = child.next) {
                 if(child instanceof ParagraphNode) {
                     for(Node n=child.firstChild;n!=null;n=n.next)
-                        n.toHtml(b);
+                        n.toHtml(context, b);
                     noNewline = true;
                 }
                 else {
@@ -37,14 +38,14 @@ public class ItemNode extends Node {
                         b.append('\n');
                         noNewline = false;
                     }
-                    child.toHtml(b);
+                    child.toHtml(context, b);
                 }
             }
             b.append("</li>\n");
         }
         else {
             b.append("<li>\n");
-            super.toHtml(b);
+            super.toHtml(context, b);
             b.append("</li>\n");
         }
     }