public void process ( File input ) throws IOException { File filtered = getFilteredVersion ( input ) ; if ( filtered == null ) { // It was not copied. getLog ( ) . warn ( "Cannot find the filtered version of " + input . getAbsolutePath ( ) + ", " + "using source file." ) ; filtered = input ; } // Actual processing. String result = instance . markdownToHtml ( FileUtils . readFileToString ( filtered ) ) ; FileUtils . write ( getOutputFile ( input , "html" ) , result ) ; }
Processes the given markdown file . When the filtered version of the file exists it uses it .