Class MarkdownHtml

java.lang.Object
io.github.jbastgen.stemma.app.markdown.MarkdownHtml

public final class MarkdownHtml extends Object
Markdown as HTML for the clipboard: pasted into a mail, a word processor or a notes app it keeps its headings, lists, emphasis, code and tables. Built from the blocks of Markdown; text is escaped, and only web links (http, https, mailto) become links.
  • Method Details

    • fragment

      public static String fragment(List<io.github.jbastgen.stemma.app.markdown.Markdown.Block> blocks)
      The blocks as HTML for a web view. Lists are nested by the level of their items; the text is escaped, and links are only active for http, https and mailto addresses.
    • escape

      public static String escape(String s)
      Escapes the characters that mean something in HTML.