Package com.petebevin.markdown

Examples of com.petebevin.markdown.MarkdownProcessor


   *
   * @param str
   * @return
   */
  private String markdown2html(String str) {
    MarkdownProcessor mp = new MarkdownProcessor();
    String mdString = mp.markdown(str);
    return mdString;
  }
View Full Code Here


{
    AWBinding _value;

    public static String translateMarkdown (String text)
    {
        MarkdownProcessor markdown = new MarkdownProcessor();
        String value = trimLeadingWhitespace(text);
        value = preprocessLocalLinks(value);

        value = markdown.markdown(value);

        value = tweakCodeBlocks(value);
        value = idHeadings(value);

        return value;
View Full Code Here

   * @param markdown
   * @return
   */
  public static String markdownToHtml(String markdown)
  {
    MarkdownProcessor processor = new MarkdownProcessor();
    String text = processor.markdown(markdown);

    text = processLiquidTags(text);
    return text;
  }
View Full Code Here

    builder.append("</code>");

    final String docText = getDocumentationText(namedComponent);
    if (docText != null) {
      builder.append("<br/><br/>");
      final MarkdownProcessor processor = new MarkdownProcessor();
      builder.append(processor.markdown(docText));
    }

    return builder.toString();
  }
View Full Code Here

  public void setAddtime(Date addtime) {
    this.addtime = addtime;
  }
 
  public String getContentHtml() {
    return new MarkdownProcessor().markdown(content);
  }
View Full Code Here

    public int compareTo(Module module) {
        return name == null ? -1 : name.compareTo(module.name);
    }

    public String getDescriptionHtml() {
        return new MarkdownProcessor().markdown(description);
    }
View Full Code Here

    scrollPane.repaint();   
  }
 
  public static String getHTML(String markdown) {
   
      MarkdownProcessor processor = new MarkdownProcessor();
     
      return processor.markdown(markdown);
  }
View Full Code Here

    final String cmd = pStore
        .getString(MarkdownPreferencePage.PREF_MARKDOWN_COMMAND);
    if (Utils.isBlank(cmd)
        || (cmd.startsWith("(") && cmd.contains("MarkdownJ"))) {
      // Use MarkdownJ
      MarkdownProcessor markdown = new MarkdownProcessor();
      // MarkdownJ doesn't convert £s for some reason
      text = text.replace("£", "&pound;");
      String html = markdown.markdown(text);
      return html;
    }
    // Attempt to run external command
    try {
      final File md = File.createTempFile("tmp", ".md");
View Full Code Here

  }

  /** 根据format返回格式化后的内容 */
  public static String formatContent(String content, String format) {
    if ("markdown".equals(format.toLowerCase()) || "md".equals(format.toLowerCase())) {
      return new MarkdownProcessor().markdown(content);
    }

    return splitContent(content);
  }
View Full Code Here

TOP

Related Classes of com.petebevin.markdown.MarkdownProcessor

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.