com.vladsch.flexmark.util.data.MutableDataHolder Java Examples

The following examples show how to use com.vladsch.flexmark.util.data.MutableDataHolder. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: Utils.java    From para with Apache License 2.0 5 votes vote down vote up
private static MutableDataHolder getMarkdownOptions() {
	return new MutableDataSet()
			.set(HtmlRenderer.ESCAPE_HTML, true)
			.set(EmojiExtension.USE_IMAGE_TYPE, EmojiImageType.UNICODE_FALLBACK_TO_IMAGE)
			// for full GFM table compatibility add the following table extension options:
			.set(TablesExtension.COLUMN_SPANS, false)
			.set(TablesExtension.APPEND_MISSING_COLUMNS, true)
			.set(TablesExtension.DISCARD_EXTRA_COLUMNS, true)
			.set(TablesExtension.HEADER_SEPARATOR_COLUMN_MATCH, true)
			.set(Parser.EXTENSIONS, Arrays.asList(TablesExtension.create(), EmojiExtension.create(),
					StrikethroughExtension.create(), TaskListExtension.create()));
}
 
Example #2
Source File: MdPageGeneratorMojo.java    From markdown-page-generator-plugin with MIT License 5 votes vote down vote up
/**
   * Execute the maven plugin.
   *
   * @throws MojoExecutionException Something went wrong
   */
  @Override
  public void execute() throws MojoExecutionException {
      // First, if filtering is enabled, perform that using the Maven magic
      if (applyFiltering) {
          performMavenPropertyFiltering(new File(inputDirectory), filteredOutputDirectory, getInputEncoding());
          inputDirectory = filteredOutputDirectory.getAbsolutePath();
      }

      getLog().info("Pre-processing markdown files from input directory: " + inputDirectory);
      if (!preprocessMarkdownFiles(new File(inputDirectory))){
	getLog().info("Pre-processing markdown files from input directory: markdown files not found" + inputDirectory);
	return;
}

      if (!markdownDTOs.isEmpty()) {
          getLog().info("Process Pegdown extension options");
          int pegdownOptions = getPegdownExtensions(pegdownExtensions);
          MutableDataHolder flexmarkOptions = getFlexmarkParserOptions(flexmarkParserOptions);
          final Map<String, Attributes> attributesMap = processAttributes(attributes);

          getLog().info("Parse Markdown to HTML");
          processMarkdown(markdownDTOs, pegdownOptions, flexmarkOptions, attributesMap);
      }

      // FIXME: This will possibly overwrite any filtering updates made in the maven property filtering step above
      if (StringUtils.isNotEmpty(copyDirectories)) {
          getLog().info("Copy files from directories");
          for (String dir : copyDirectories.split(",")) {
              for (Entry<String, String> copyAction : getFoldersToCopy(inputDirectory, outputDirectory, dir).entrySet()) {
                  copyFiles(copyAction.getKey(), copyAction.getValue());
              }
          }
      }
  }
 
Example #3
Source File: UMLExtension.java    From zeppelin with Apache License 2.0 4 votes vote down vote up
@Override
public void parserOptions(MutableDataHolder options) {
}
 
Example #4
Source File: UMLExtension.java    From zeppelin with Apache License 2.0 2 votes vote down vote up
@Override
public void rendererOptions(MutableDataHolder options) {

}
 
Example #5
Source File: AttributesExtension.java    From markdown-page-generator-plugin with MIT License 2 votes vote down vote up
@Override
public void rendererOptions(final MutableDataHolder options) {

}
 
Example #6
Source File: PageGeneratorExtension.java    From markdown-page-generator-plugin with MIT License 2 votes vote down vote up
@Override
public void rendererOptions(final MutableDataHolder options) {

}