-
Couldn't load subscription status.
- Fork 12
Document_ParsingOptions_Position_Error_RenderingFormat_RenderingOptions
Options for rendering a CommonMark document.
public struct RenderingOptions: OptionSetOptionSet
public init(rawValue: Int32 = CMARK_OPT_DEFAULT)Render softbreak elements as spaces.
let noBreaks = RenderingOptions(rawValue: CMARK_OPT_NOBREAKS)Important: This option has no effect when rendering XML.
Render softbreak elements as hard line breaks.
let hardBreaks = RenderingOptions(rawValue: CMARK_OPT_HARDBREAKS)Important: This option has no effect when rendering XML.
Include a data-sourcepos attribute on all block elements
to map the rendered output to the source input.
let includeSourcePosition = RenderingOptions(rawValue: CMARK_OPT_SOURCEPOS)Important: This option has an effect only when rendering HTML or XML.
Render raw HTML and "unsafe" links.
let unsafe = RenderingOptions(rawValue: CMARK_OPT_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.
var rawValue: Int32Render a document into a given format with the specified options.
public func render(format: RenderingFormat, options: RenderingOptions = [], width: Int = 0) -> String- format: The rendering format
- options: The rendering options
- width: The column width used to wrap lines for rendered output (
.commonmark,.man, and.latexformats only). Must be a positive number. Pass0to prevent line wrapping.
The rendered text.
public static func <(lhs: Document.Position, rhs: Document.Position) -> BoolGenerated at 2021-03-03T19:19:22+0000 using swift-doc 1.0.0-beta.5.
Types
- BlockQuote
- Code
- CodeBlock
- CommonMarkBuilder
- Document
- Document.Error
- Document.ParsingOptions
- Document.Position
- Emphasis
- ForEach
- Fragment
- HTMLBlock
- HardLineBreak
- Heading
- Image
- Link
- List
- List.Delimiter
- List.Item
- List.Kind
- Node
- Node.RenderingFormat
- Node.RenderingOptions
- Paragraph
- RawHTML
- Section
- SoftLineBreak
- StringBuilder
- Strong
- Text
- ThematicBreak
- VisitorContinueKind