本文整理汇总了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;
}
开发者ID:jmfgdev,项目名称:gitplex-mit,代码行数:41,代码来源:DefaultMarkdownManager.java
示例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()));
}
开发者ID:Erudika,项目名称:para,代码行数:13,代码来源:Utils.java
示例3: getOptions
import com.vladsch.flexmark.util.options.MutableDataHolder; //导入依赖的package包/类
public MutableDataHolder getOptions() {
return options;
}
开发者ID:jdesive,项目名称:textmd,代码行数:4,代码来源:MarkdownParser.java
示例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;
}
开发者ID:tiagohm,项目名称:MarkdownView,代码行数:5,代码来源:MarkdownView.java
示例5: setEmojiImageExtension
import com.vladsch.flexmark.util.options.MutableDataHolder; //导入依赖的package包/类
public MarkdownView setEmojiImageExtension(String ext) {
((MutableDataHolder) OPTIONS).set(EmojiExtension.IMAGE_EXT, ext);
return this;
}
开发者ID:tiagohm,项目名称:MarkdownView,代码行数:5,代码来源:MarkdownView.java
示例6: rendererOptions
import com.vladsch.flexmark.util.options.MutableDataHolder; //导入依赖的package包/类
@Override
public void rendererOptions(MutableDataHolder options) {
}
开发者ID:jmfgdev,项目名称:gitplex-mit,代码行数:4,代码来源:SourcePositionTrackExtension.java
示例7: rendererOptions
import com.vladsch.flexmark.util.options.MutableDataHolder; //导入依赖的package包/类
public void rendererOptions(MutableDataHolder options) {
}
开发者ID:jmfgdev,项目名称:gitplex-mit,代码行数:3,代码来源:UrlResolveExtension.java
示例8: set
import com.vladsch.flexmark.util.options.MutableDataHolder; //导入依赖的package包/类
@SuppressWarnings("unchecked")
void set(MutableDataHolder holder) { holder.set(PARAMS, this); }
开发者ID:vsch,项目名称:MissingInActions,代码行数:3,代码来源:CaretSnapshot.java
示例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;
}
开发者ID:sorcererXW,项目名称:SorceryIconPack,代码行数:5,代码来源:AsynMarkdownView.java
示例10: setEmojiImageExtension
import com.vladsch.flexmark.util.options.MutableDataHolder; //导入依赖的package包/类
public AsynMarkdownView setEmojiImageExtension(String ext) {
((MutableDataHolder) OPTIONS).set(EmojiExtension.IMAGE_EXT, ext);
return this;
}
开发者ID:sorcererXW,项目名称:SorceryIconPack,代码行数:5,代码来源:AsynMarkdownView.java
示例11: rendererOptions
import com.vladsch.flexmark.util.options.MutableDataHolder; //导入依赖的package包/类
@Override
public void rendererOptions(final MutableDataHolder options) {
}
开发者ID:tiagohm,项目名称:MarkdownView,代码行数:5,代码来源:LocalizationExtension.java
示例12: parserOptions
import com.vladsch.flexmark.util.options.MutableDataHolder; //导入依赖的package包/类
@Override
public void parserOptions(final MutableDataHolder options) {
}
开发者ID:tiagohm,项目名称:MarkdownView,代码行数:5,代码来源:LocalizationExtension.java
示例13: rendererOptions
import com.vladsch.flexmark.util.options.MutableDataHolder; //导入依赖的package包/类
@Override
public void rendererOptions(MutableDataHolder mutableDataHolder) {
}
开发者ID:borisdiakur,项目名称:marked,代码行数:5,代码来源:ConfluenceCodeBlockExtension.java
注:本文中的com.vladsch.flexmark.util.options.MutableDataHolder类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论