Skip to content
This repository has been archived by the owner on Oct 17, 2021. It is now read-only.

Node_RenderingOptions

mattt edited this page Dec 21, 2020 · 2 revisions

Node.RenderingOptions

Options for rendering a CommonMark document.

public struct RenderingOptions: OptionSet

Inheritance

OptionSet

Initializers

init(rawValue:)

public init(rawValue: Int32 = CMARK_OPT_DEFAULT)

Properties

rawValue

var rawValue: Int32

unsafe

Render raw HTML and "unsafe" links.

let unsafe

A link is considered to be "unsafe" if its scheme is javascript:, vbscript:, or file:, or if its scheme is data: and the MIME type of the encoded data isn't one of the following:

  • image/png

  • image/gif

  • image/jpeg

  • image/webp

By default, raw HTML is replaced by a placeholder HTML comment. Unsafe links are replaced by empty strings.

noBreaks

Render softbreak elements as spaces.

let noBreaks

hardBreaks

Render softbreak elements as hard line breaks.

let hardBreaks

includeSourcePosition

Include a data-sourcepos attribute on all block elements to map the rendered output to the source input.

let includeSourcePosition
Clone this wiki locally