org.asciidoctor.Options.<init>()方法的使用及代码示例

x33g5p2x  于2022-01-26 转载在 其他  
字(3.4k)|赞(0)|评价(0)|浏览(101)

本文整理了Java中org.asciidoctor.Options.<init>()方法的一些代码示例,展示了Options.<init>()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Options.<init>()方法的具体详情如下:
包路径:org.asciidoctor.Options
类名称:Options
方法名:<init>

Options.<init>介绍

暂无

代码示例

代码示例来源:origin: spring-projects/spring-restdocs

@Test
public void snippetsAttributeFromDocumentPreambleIsNotOverridden() {
  Options options = new Options();
  options.setAttributes(new Attributes("projectdir=../../.."));
  String converted = Asciidoctor.Factory.create()
      .convert(":snippets: custom\n{snippets}", options);
  assertThat(converted).contains("custom");
}

代码示例来源:origin: spring-projects/spring-restdocs

@Test
public void snippetsAttributeIsSet() {
  Options options = new Options();
  options.setAttributes(new Attributes("projectdir=../../.."));
  String converted = Asciidoctor.Factory.create().convert("{snippets}", options);
  assertThat(converted)
      .contains("build" + File.separatorChar + "generated-snippets");
}

代码示例来源:origin: spring-projects/spring-restdocs

@Test
public void snippetsAttributeFromConvertArgumentIsNotOverridden() {
  Options options = new Options();
  options.setAttributes(new Attributes("snippets=custom projectdir=../../.."));
  String converted = Asciidoctor.Factory.create().convert("{snippets}", options);
  assertThat(converted).contains("custom");
}

代码示例来源:origin: com.qwazr/qwazr-library-asciidoctor

/**
 * @return a clone of the current options
 */
public Options getNewOptions() {
  return new Options(options.map());
}

代码示例来源:origin: org.ovirt.engine.api/metamodel-tool

public String toHtml(String text) {
    // Create the options:
    Options options = new Options();
    options.setAttributes(configuration.getAttributes());

    // Perform the rendering:
    return doctor.convert(text, options);
  }
}

代码示例来源:origin: de.elnarion.util/docconverter-adoc2adoc

private List<InputStream> convertToInputStreams(List<File> source)
    throws IOException {
  List<InputStream> inputStreams = new ArrayList<>();
  Asciidoctor asciidoctor = Factory.create();
  ExtensionGroup group = asciidoctor.createGroup();
  Preprocessor preprocessor = new Preprocessor();
  group.preprocessor(preprocessor);
  Options options = new Options();
  options.setToFile(false);
  options.setSafe(SafeMode.UNSAFE);
  group.register();
  for (File file : source) {
    inputStreams.add(processSingleFile(file, asciidoctor, group, preprocessor, options));
  }
  return inputStreams;
}

代码示例来源:origin: net.thucydides/thucydides-core

private Options getOptions() {
    Options options = new Options();
    options.setCompact(true);
    options.setDocType("inline");

    Attributes attributes = new Attributes();
    attributes.setExperimental(true);
    attributes.setDataUri(true);

    options.setAttributes(attributes);

    return options;

  }
}

代码示例来源:origin: net.serenity-bdd/core

private Options getOptions() {
    Options options = new Options();
    options.setCompact(true);
    options.setDocType("inline");

    Attributes attributes = new Attributes();
    attributes.setExperimental(true);
    attributes.setDataUri(true);

    options.setAttributes(attributes);

    return options;

  }
}

代码示例来源:origin: net.serenity-bdd/serenity-model

private Options getOptions() {
    Options options = new Options();
    options.setCompact(true);
    options.setDocType("inline");

    Attributes attributes = new Attributes();
    attributes.setExperimental(true);
    attributes.setDataUri(true);

    options.setAttributes(attributes);

    return options;

  }
}

代码示例来源:origin: com.qwazr/qwazr-library-asciidoctor

asciidoctor.requireLibrary(library);
options = new Options();
if (to_file != null)
  options.setToFile(to_file);

相关文章