private static void storeHtml()

in markbook/src/main/java/org/apache/hadoop/gateway/markbook/MarkBook.java [73:82]


  private static void storeHtml( CommandLine command, String markdown ) throws IOException {
    PegDownProcessor processor = new PegDownProcessor(
        Extensions.AUTOLINKS | Extensions.FENCED_CODE_BLOCKS | Extensions.QUOTES +
        Extensions.SMARTS | Extensions.TABLES | Extensions.DEFINITIONS );
    log( "Converting markdown (" + markdown.length() + " bytes) to HTML" );
    String html = processor.markdownToHtml( markdown.toString() );
    File outputFile = new File( command.getOptionValue( "o" ) );
    log( "Storing HTML to " + outputFile.getAbsolutePath() );
    FileUtils.write( outputFile, html );
  }