List<String> outFormats = getOutputFormats(tree);
String outFormat = outFormats == null ?
RmdOutputFormat.OUTPUT_HTML_DOCUMENT :
outFormats.get(0);
RmdTemplate template = getTemplateForFormat(outFormat);
if (template == null)
return null;
// If this format produces HTML and is marked as Shiny, treat it as
// a Shiny format
if (template.getFormat(outFormat).getExtension().equals("html") &&
tree.getKeyValue(RmdFrontMatter.RUNTIME_KEY).equals(
RmdFrontMatter.SHINY_RUNTIME))
{
isShiny = true;
}