Composing Functions with compose3:31 with Craig Dennis
Compose allows you to prepend your function to the start of the function chain.
Whoops! I forgot to use the Markdown input I made. HTML can be passed through CommonMark without a problem. So here is the updated code, also available in the repository.
String result = Renderer.render(htmlInput, markeddownSanitizer); System.out.println("HTML is safe..."); System.out.println(result); result = Renderer.render(markdownInput, markeddownSanitizer); System.out.println("Markdown is too..."); System.out.println(result);
You need to sign up for Treehouse in order to download course files.Sign up