Package com.redhat.ceylon.common.tools.help.Markdown

Examples of com.redhat.ceylon.common.tools.help.Markdown.Section


                "\n" +
                "A sentence\n" +
                "\n");
        List<Section> sections = Markdown.extractSections(doc);
        Assert.assertEquals(3, sections.size());
        Section section = sections.get(0);
        Assert.assertNull(section.getHeading());
        Document sectionBody = section.getDoc();
        Assert.assertEquals("<p>Some stuff</p>", html(sectionBody).trim());
       
        section = sections.get(1);
        Assert.assertEquals("<h1> First <code>H1</code></h1>",
                html(section.getHeading()).trim());
        sectionBody = section.getDoc();
        Assert.assertEquals(""+
"<p>A sentence</p>\n"+
"\n"+
"<h2> <code>H2</code> under first <code>H1</code></h2>\n"+
"\n"+
"<p>A sentence</p>", html(sectionBody).trim());
       
        section = sections.get(2);
        Assert.assertEquals("<h1> Second <code>H1</code></h1>",
                html(section.getHeading()).trim());
        sectionBody = section.getDoc();
        Assert.assertEquals(""+
"<p>A sentence</p>\n"+
"\n"+
"<h2> <code>H2</code> under second <code>H1</code></h2>\n"+
"\n"+
View Full Code Here

TOP

Related Classes of com.redhat.ceylon.common.tools.help.Markdown.Section

Copyright © 2018 www.massapicom. 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.