本文整理汇总了Java中com.vladsch.flexmark.util.options.MutableDataHolder类的典型用法代码示例。如果您正苦于以下问题:Java MutableDataHolder类的具体用法?Java MutableDataHolder怎么用?Java MutableDataHolder使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
MutableDataHolder类属于com.vladsch.flexmark.util.options包,在下文中一共展示了MutableDataHolder类的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: render
import com.vladsch.flexmark.util.options.MutableDataHolder; //导入依赖的package包/类
@Override
public String render(String markdown, @Nullable String baseUrl, boolean postProcess) {
Preconditions.checkArgument(baseUrl == null || baseUrl.startsWith("/"));
List<Extension> extensions = new ArrayList<>();
extensions.add(AnchorLinkExtension.create());
extensions.add(TablesExtension.create());
extensions.add(TaskListExtension.create());
extensions.add(DefinitionExtension.create());
extensions.add(TocExtension.create());
extensions.add(AutolinkExtension.create());
extensions.add(new UrlResolveExtension());
extensions.addAll(contributedExtensions);
MutableDataHolder options = new MutableDataSet()
.set(HtmlRenderer.GENERATE_HEADER_ID, true)
.set(AnchorLinkExtension.ANCHORLINKS_SET_NAME, true)
.set(AnchorLinkExtension.ANCHORLINKS_ANCHOR_CLASS, "header-anchor")
.set(AnchorLinkExtension.ANCHORLINKS_TEXT_SUFFIX, "<i class='fa fa-link'></i>")
.set(Parser.SPACE_IN_LINK_URLS, true)
.setFrom(ParserEmulationProfile.GITHUB_DOC)
.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(UrlResolveExtension.BASE_URL, baseUrl)
.set(Parser.EXTENSIONS, extensions);
Parser parser = Parser.builder(options).build();
HtmlRenderer htmlRenderer = HtmlRenderer.builder(options).build();
Node document = parser.parse(markdown);
String html = htmlRenderer.render(document);
if (postProcess)
html = postProcess(html);
return html;
}
示例2: getMarkdownOptions
import com.vladsch.flexmark.util.options.MutableDataHolder; //导入依赖的package包/类
private static MutableDataHolder getMarkdownOptions() {
return new MutableDataSet()
.set(HtmlRenderer.ESCAPE_HTML, true)
.set(EmojiExtension.USE_IMAGE_URLS, true)
// 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()));
}
示例3: getOptions
import com.vladsch.flexmark.util.options.MutableDataHolder; //导入依赖的package包/类
public MutableDataHolder getOptions() {
return options;
}
示例4: setEmojiRootPath
import com.vladsch.flexmark.util.options.MutableDataHolder; //导入依赖的package包/类
public MarkdownView setEmojiRootPath(String path) {
((MutableDataHolder) OPTIONS).set(EmojiExtension.ROOT_IMAGE_PATH, path);
return this;
}
示例5: setEmojiImageExtension
import com.vladsch.flexmark.util.options.MutableDataHolder; //导入依赖的package包/类
public MarkdownView setEmojiImageExtension(String ext) {
((MutableDataHolder) OPTIONS).set(EmojiExtension.IMAGE_EXT, ext);
return this;
}
示例6: rendererOptions
import com.vladsch.flexmark.util.options.MutableDataHolder; //导入依赖的package包/类
@Override
public void rendererOptions(MutableDataHolder options) {
}
示例7: rendererOptions
import com.vladsch.flexmark.util.options.MutableDataHolder; //导入依赖的package包/类
public void rendererOptions(MutableDataHolder options) {
}
示例8: set
import com.vladsch.flexmark.util.options.MutableDataHolder; //导入依赖的package包/类
@SuppressWarnings("unchecked")
void set(MutableDataHolder holder) { holder.set(PARAMS, this); }
示例9: setEmojiRootPath
import com.vladsch.flexmark.util.options.MutableDataHolder; //导入依赖的package包/类
public AsynMarkdownView setEmojiRootPath(String path) {
((MutableDataHolder) OPTIONS).set(EmojiExtension.ROOT_IMAGE_PATH, path);
return this;
}
示例10: setEmojiImageExtension
import com.vladsch.flexmark.util.options.MutableDataHolder; //导入依赖的package包/类
public AsynMarkdownView setEmojiImageExtension(String ext) {
((MutableDataHolder) OPTIONS).set(EmojiExtension.IMAGE_EXT, ext);
return this;
}
示例11: rendererOptions
import com.vladsch.flexmark.util.options.MutableDataHolder; //导入依赖的package包/类
@Override
public void rendererOptions(final MutableDataHolder options) {
}
示例12: parserOptions
import com.vladsch.flexmark.util.options.MutableDataHolder; //导入依赖的package包/类
@Override
public void parserOptions(final MutableDataHolder options) {
}
示例13: rendererOptions
import com.vladsch.flexmark.util.options.MutableDataHolder; //导入依赖的package包/类
@Override
public void rendererOptions(MutableDataHolder mutableDataHolder) {
}