Steppschuh / Java-Markdown-Generator

Java library to generate markdown
MIT License
230 stars 47 forks source link

Fix Sub Lists #5

Closed Steppschuh closed 7 years ago

Steppschuh commented 7 years ago

Adding an UnorderedList as new UnorderedListItem to an existing UnorderedList should create a sub-list.

    @Test
    public void example() throws Exception {
        List<Object> items = Arrays.asList(
                "Item 1",
                "Item 2",
                new UnorderedList<>(Arrays.asList(
                        "Item 2.1",
                        "Item 2.2",
                        "Item 2.3"
                )),
                "Item 3"
        );
        System.out.println(new UnorderedList<>(items));
    }

Should print: