本文整理汇总了Java中com.petebevin.markdown.MarkdownProcessor类的典型用法代码示例。如果您正苦于以下问题:Java MarkdownProcessor类的具体用法?Java MarkdownProcessor怎么用?Java MarkdownProcessor使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
MarkdownProcessor类属于com.petebevin.markdown包,在下文中一共展示了MarkdownProcessor类的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: generateDoc
import com.petebevin.markdown.MarkdownProcessor; //导入依赖的package包/类
@Override
public String generateDoc(PsiElement element, @Nullable PsiElement originalElement) {
if (!(element instanceof TaskPsiElement)) return null;
final Task task = ((TaskPsiElement)element).getTask();
final StringBuilder builder = new StringBuilder();
builder.append("<b>Summary:</b> ").append(task.getSummary()).append("<br>");
builder.append("<b>Id:</b> ").append(task.getId()).append("<br>");
if (task.getCreated() != null) {
builder.append("<b>Created at:</b> ").append(task.getCreated()).append("<br>");
}
if (task.getUpdated() != null) {
builder.append("<b>Updated at:</b> ").append(task.getUpdated()).append("<br>");
}
final String description = task.getDescription();
if (description != null) {
final MarkdownProcessor processor = new MarkdownProcessor();
builder.append("<b>Description:</b><br>").append(processor.markdown(description));
}
for (Comment comment : task.getComments()) {
comment.appendTo(builder);
}
return XmlStringUtil.wrapInHtml(builder);
}
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:24,代码来源:TaskDocumentationProvider.java
示例2: convertToHtml
import com.petebevin.markdown.MarkdownProcessor; //导入依赖的package包/类
public static String convertToHtml(@NotNull String content) {
ArrayList<String> lines = ContainerUtil.newArrayList(content.split("\n|\r|\r\n"));
MarkdownUtil.replaceHeaders(lines);
MarkdownUtil.replaceCodeBlock(lines);
return new MarkdownProcessor().markdown(StringUtil.join(lines, "\n"));
}
开发者ID:medvector,项目名称:educational-plugin,代码行数:8,代码来源:StudyUtils.java
示例3: buildEdge
import com.petebevin.markdown.MarkdownProcessor; //导入依赖的package包/类
private static String buildEdge(String markdown, String version) {
if (version.toUpperCase().endsWith("-HEAD") || version.toUpperCase().endsWith("-EDGE")) {
version = version.substring(0, version.length() - 5);
}
Pattern p = Pattern.compile(
"(?is-m)^.*###\\s*v" + version + ".*?\n(.*?)(?:###\\s*v.*)?$");
Matcher m = p.matcher(markdown);
String subMarkdown = m.matches() ? m.group(1) : "* No changelog records for this edge release.";
return new MarkdownProcessor().markdown(subMarkdown);
}
开发者ID:git03394538,项目名称:lombok-ianchiu,代码行数:12,代码来源:CompileChangelog.java
示例4: onCreate
import com.petebevin.markdown.MarkdownProcessor; //导入依赖的package包/类
/**
* Called when the activity is first created.
*/
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
fixImageTilingOn(getSupportActionBar());
setContentView(about_activity);
ActionBar actionBar = getSupportActionBar();
actionBar.setDisplayHomeAsUpEnabled(true);
configureActionBar(actionBar);
MarkdownProcessor m = new MarkdownProcessor();
String html = m.markdown(loadMarkdown());
webView.loadDataWithBaseURL(null, html, "text/html", "UTF-8", null);
// webView.getSettings().setBuiltInZoomControls(true); // Doesn't work great
}
开发者ID:m4rzEE1,项目名称:ninja_chic-,代码行数:18,代码来源:MarkdownActivityBase.java
示例5: markdownToHtml
import com.petebevin.markdown.MarkdownProcessor; //导入依赖的package包/类
/**
* Converts Markdown to HTML.
*
* @param markdown
* @return Markdown on success and an empty string otherwise.
*/
public static String markdownToHtml(String markdown) {
if (StringUtils.isBlank(markdown)) {
return "";
}
MarkdownProcessor proc = new MarkdownProcessor();
return proc.markdown(markdown);
}
开发者ID:headwirecom,项目名称:aem-solr-search,代码行数:16,代码来源:MarkdownUtils.java
示例6: build
import com.petebevin.markdown.MarkdownProcessor; //导入依赖的package包/类
private static String build(String markdown) {
return new MarkdownProcessor().markdown(markdown);
}
开发者ID:git03394538,项目名称:lombok-ianchiu,代码行数:4,代码来源:CompileChangelog.java
注:本文中的com.petebevin.markdown.MarkdownProcessor类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论