prexent v0.2.1 Prexent.Parser View Source

This module is the parser from markdown to HTML

Link to this section Summary

Types

The result of the parse. This type will return a list of slides()

A single slide

Functions

Parses slides of the markdown to a list of HTML. If exists any parse error, the item in the list will be the error message.

Link to this section Types

Link to this type

parse_result()

View Source
parse_result() :: [slide()]

The result of the parse. This type will return a list of slides()

Link to this type

slide()

View Source
slide() :: [
  Map.t(
    type ::
      :html
      | :code
      | :header
      | :footer
      | :comment
      | :custom_css
      | :slide_background
      | :slide_classes
      | :global_background
      | :error,
    content :: String.t()
  )
]

A single slide

Link to this section Functions

Link to this function

to_parsed_list(path_to_file)

View Source
to_parsed_list(String.t()) :: parse_result()

Parses slides of the markdown to a list of HTML. If exists any parse error, the item in the list will be the error message.

It recognizes some commands:

  • !include <file> - with a markdown file to include in any place
  • !code <file> - will parse a code script