Package fitnesse.wikitext.parser

Source Code of fitnesse.wikitext.parser.ListBuilder

package fitnesse.wikitext.parser;

import fitnesse.html.HtmlTag;

public class ListBuilder implements Translation {
    private String listTag;

    public ListBuilder(String listTag) { this.listTag = listTag; }

    public String toTarget(Translator translator, Symbol symbol) {
        HtmlTag list = new HtmlTag(listTag);
        for (Symbol child: symbol.getChildren()) {
            list.add(new HtmlTag("li", translator.translate(child)));
        }
        return list.html();
    }
}
TOP

Related Classes of fitnesse.wikitext.parser.ListBuilder

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.