private void setOutputFormat(
     RmdFrontMatter frontMatter, String format, final CommandWithArg<String> onCompleted) {
   // If the format list doesn't already contain the given format, add it
   // to the list and transfer any applicable options
   if (!JsArrayUtil.jsArrayStringContains(frontMatter.getFormatList(), format)) {
     RmdTemplate template = getTemplateForFormat(format);
     RmdFrontMatterOutputOptions opts = RmdFrontMatterOutputOptions.create();
     if (template != null) {
       opts = transferOptions(frontMatter, template, format);
     }
     frontMatter.setOutputOption(format, opts);
   }
   frontMatterToYAML(frontMatter, format, onCompleted);
 }
예제 #2
0
 private static JsArrayString copy(JsArrayString array) {
   return JsArrayUtil.copy(array);
 }
예제 #3
0
 private JsArrayString concat(JsArrayString a, JsArrayString b) {
   return JsArrayUtil.concat(a, b);
 }