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

Document_RenderingOptions

mattt edited this page Apr 10, 2020 · 2 revisions

Document.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:

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

Important: This option has an effect only when rendering HTML.

noBreaks

Render softbreak elements as spaces.

let noBreaks

Important: This option has no effect when rendering XML.

hardBreaks

Render softbreak elements as hard line breaks.

let hardBreaks

Important: This option has no effect when rendering XML.

includeSourcePosition

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

let includeSourcePosition

Important: This option has an effect only when rendering HTML or XML.

Clone this wiki locally