Class Markdown

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

public final class Markdown extends Object
A small Markdown reader for the preview of *.md files (feature 29): headings, paragraphs, lists (also nested), block quotes, fenced code, rules, simple tables and the usual inline marks (bold, italic, strike-through, code, links, images as their text). It makes a list of blocks and spans, nothing that runs: raw HTML is shown as text, links only carry their address.
  • Method Details

    • parse

      public static List<io.github.jbastgen.stemma.app.markdown.Markdown.Block> parse(String text)
      Reads Markdown into blocks: headings, paragraphs, lists, code blocks, quotes, tables and rules. Lines are the unit; a blank line ends a paragraph.
    • isMarkdownFile

      public static boolean isMarkdownFile(String path)
      Whether a file is shown with a preview: .md and .markdown.