Compile

Markascend.compile src, options

Options


Customizing macros

More macro processors can be added by

class Markascend::Macro
  def parse_fancy_macro
    ... compose result string with: env, content, inline
  end
end

Macro names are limited to names like ruby methods.

Markascend.compile src, macros: %w[fancy_macro del]

Customizing line-unit parsers

More line-unit parsers can be added by

class Markascend::LineUnit
  def parse_at
    ... compose result string with: env, line, block, linenum
  end
end

The list of inline parsers can be changed, or reordered

Markascend.compile src, line_units: Markascend::DEFAULT_LINE_UNITS + %w[at]

Notes on \slim

You need to install slim (gem ins slim) and require it before using the \slim macro:

require 'slim'

It is disabled in sandbox mode.

Notes on \dot

You need to install graphviz before using the \dot macro.

It is disabled in sandbox mode.

Notes on output format

The output is valid HTML5, but not XHTML.