Package org.tautua.markdownpapers.parser

Examples of org.tautua.markdownpapers.parser.Parser


public class PlaintextTest {

    public void renderAndCompare(String mdFile, String txtFile) throws Exception {
        StringWriter sw = new StringWriter();
        try (InputStreamReader stream = new InputStreamReader(PlaintextTest.class.getResourceAsStream(mdFile))) {
            Parser parser = new Parser(stream);
            Document document = parser.parse();
            PlaintextMarkdownVisitor emitter = new PlaintextMarkdownVisitor(new WordWrap(sw));
            document.accept(emitter);
        }
       
        StringBuilder sb = new StringBuilder();
View Full Code Here


        // Make sure the parent diretory exists
        outFile.getParentFile().mkdirs();
        Writer out = new OutputStreamWriter(buildContext.newFileOutputStream(outFile), UTF8);

        Parser parser = new Parser(in);
        TitleSpyHtmlEmitter emitter = new TitleSpyHtmlEmitter(out);
        Document document = parser.parse();
        document.accept(emitter);

        in.close();
        out.close();
View Full Code Here

TOP

Related Classes of org.tautua.markdownpapers.parser.Parser

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.