class Markd::Options

Overview

Markdown rendering options.

Defined in:

markd/options.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(time : Bool = false, gfm : Bool = false, toc : Bool = false, smart : Bool = false, source_pos : Bool = false, safe : Bool = false, prettyprint : Bool = false, base_url : Nil | URI = nil) #

[View source]

Instance Method Detail

def base_url : URI | Nil #

If #base_url is not nil, it is used to resolve URLs of relative links. It act's like HTML's <base href="base_url"> in the context of a Markdown document.


[View source]
def base_url=(base_url : URI | Nil) #

If #base_url is not nil, it is used to resolve URLs of relative links. It act's like HTML's <base href="base_url"> in the context of a Markdown document.


[View source]
def gfm : Bool #

[View source]
def gfm=(gfm : Bool) #

[View source]
def prettyprint : Bool #

DEPRECATED Use #prettyprint? instead.


[View source]
def prettyprint=(prettyprint : Bool) #

If true, code tags generated by code blocks will have a prettyprint class added to them, to be used by Google code-prettify.


[View source]
def prettyprint? : Bool #

If true, code tags generated by code blocks will have a prettyprint class added to them, to be used by Google code-prettify.


[View source]
def safe : Bool #

DEPRECATED Use #safe? instead.


[View source]
def safe=(safe : Bool) #

If true, raw HTML will not be passed through to HTML output (it will be replaced by comments).


[View source]
def safe? : Bool #

If true, raw HTML will not be passed through to HTML output (it will be replaced by comments).


[View source]
def smart : Bool #

DEPRECATED Use #smart? instead.


[View source]
def smart=(smart : Bool) #

If true:

  • straight quotes will be made curly
  • -- will be changed to an en dash
  • --- will be changed to an em dash
  • ... will be changed to ellipses

[View source]
def smart? : Bool #

If true:

  • straight quotes will be made curly
  • -- will be changed to an en dash
  • --- will be changed to an em dash
  • ... will be changed to ellipses

[View source]
def source_pos : Bool #

DEPRECATED Use #source_pos? instead.


[View source]
def source_pos=(source_pos : Bool) #

If true, source position information for block-level elements will be rendered in the data-sourcepos attribute (for HTML).


[View source]
def source_pos? : Bool #

If true, source position information for block-level elements will be rendered in the data-sourcepos attribute (for HTML).


[View source]
def time : Bool #

[View source]
def time=(time : Bool) #

[View source]
def toc : Bool #

[View source]
def toc=(toc : Bool) #

[View source]