String[] messages = formatMessages(originalSources, mc, mq);
StringBuilder jsOut = new StringBuilder();
TokenConsumer renderer = new JsPrettyPrinter(jsOut);
RenderContext rc = new RenderContext(renderer);
String htmlOut = outputHtml != null ? Nodes.render(outputHtml) : null;
if (outputJs != null) {
outputJs.render(rc);
rc.getOut().noMoreTokens();
return new CajolingServiceResult(htmlOut, jsOut.toString(), messages);
} else {
return new CajolingServiceResult(htmlOut, null, messages);
}
}