One Logo Pool Ball
Foundation · IOS API REFERENCE

AttributedString.MarkdownParsingOptions

struct · iOS 15.0+ · SDK 27.1

struct MarkdownParsingOptions

Options for parsing a Markdown string into an attributed string.

Members (12)

get · iOS 15.0+

languageCode

TypeScript
get languageCode(): (string) | null
Swift declaration
var languageCode: String?

The BCP-47 language code for this document. Use this code to inform the Markdown parser of the human language of this document.

set · iOS 15.0+

languageCode

TypeScript
set languageCode(value: (string) | null)
Swift declaration
var languageCode: String?

The BCP-47 language code for this document. Use this code to inform the Markdown parser of the human language of this document.

get · iOS 15.0+

failurePolicy

TypeScript
get failurePolicy(): AttributedString_MarkdownParsingOptions_FailurePolicy
Swift declaration
var failurePolicy: AttributedString.MarkdownParsingOptions.FailurePolicy

A policy that an attributed string follows when it encounters a parsing error.

set · iOS 15.0+

failurePolicy

TypeScript
set failurePolicy(value: AttributedString_MarkdownParsingOptions_FailurePolicy)
Swift declaration
var failurePolicy: AttributedString.MarkdownParsingOptions.FailurePolicy

A policy that an attributed string follows when it encounters a parsing error.

get · iOS 15.0+

interpretedSyntax

TypeScript
get interpretedSyntax(): AttributedString_MarkdownParsingOptions_InterpretedSyntax
Swift declaration
var interpretedSyntax: AttributedString.MarkdownParsingOptions.InterpretedSyntax

The syntax for interpreting a Markdown string. The default is ``InterpretedSyntax/full``.

set · iOS 15.0+

interpretedSyntax

TypeScript
set interpretedSyntax(value: AttributedString_MarkdownParsingOptions_InterpretedSyntax)
Swift declaration
var interpretedSyntax: AttributedString.MarkdownParsingOptions.InterpretedSyntax

The syntax for interpreting a Markdown string. The default is ``InterpretedSyntax/full``.

init · iOS 16.0+

init

TypeScript
static initAllowsExtendedAttributesInterpretedSyntaxFailurePolicyLanguageCodeAppliesSourcePositionAttributes(allowsExtendedAttributes?: boolean, interpretedSyntax?: AttributedString_MarkdownParsingOptions_InterpretedSyntax, failurePolicy?: AttributedString_MarkdownParsingOptions_FailurePolicy, languageCode?: (string) | null, appliesSourcePositionAttributes?: boolean): AttributedString_MarkdownParsingOptions
Swift declaration
init(allowsExtendedAttributes: Bool = false, interpretedSyntax: AttributedString.MarkdownParsingOptions.InterpretedSyntax = .full, failurePolicy: AttributedString.MarkdownParsingOptions.FailurePolicy = .throwError, languageCode: String? = nil, appliesSourcePositionAttributes: Bool = false)

Creates options for parsing a Markdown string into an attributed string. - Parameters: - allowsExtendedAttributes: A Boolean value that indicates whether parsing an extended attribute syntax is allowed. - interpretedSyntax: The syntax for interpreting a Markdown string. - failurePolicy: A policy that an attributed string follows when it encounters a parsing error. - languageCode: The BCP-47 language code for this document. - appliesSourcePositionAttributes: A Boolean value that indicates whether the parser applies source position attributes.

init · iOS 15.0+

init

TypeScript
static initAllowsExtendedAttributesInterpretedSyntaxFailurePolicyLanguageCode(allowsExtendedAttributes?: boolean, interpretedSyntax?: AttributedString_MarkdownParsingOptions_InterpretedSyntax, failurePolicy?: AttributedString_MarkdownParsingOptions_FailurePolicy, languageCode?: (string) | null): AttributedString_MarkdownParsingOptions
Swift declaration
init(allowsExtendedAttributes: Bool = false, interpretedSyntax: AttributedString.MarkdownParsingOptions.InterpretedSyntax = .full, failurePolicy: AttributedString.MarkdownParsingOptions.FailurePolicy = .throwError, languageCode: String? = nil)

Creates options for parsing a Markdown string into an attributed string. - Parameters: - allowsExtendedAttributes: A Boolean value that indicates whether parsing an extended attribute syntax is allowed. - interpretedSyntax: The syntax for interpreting a Markdown string. - failurePolicy: A policy that an attributed string follows when it encounters a parsing error. - languageCode: The BCP-47 language code for this document.

get · iOS 15.0+

allowsExtendedAttributes

TypeScript
get allowsExtendedAttributes(): boolean
Swift declaration
var allowsExtendedAttributes: Bool

A Boolean value that indicates whether parsing an extended attribute syntax is allowed. When this property is `true`, the parser recognizes extended attribute syntax like `^[text](key: value, otherKey: otherValue)`.

set · iOS 15.0+

allowsExtendedAttributes

TypeScript
set allowsExtendedAttributes(value: boolean)
Swift declaration
var allowsExtendedAttributes: Bool

A Boolean value that indicates whether parsing an extended attribute syntax is allowed. When this property is `true`, the parser recognizes extended attribute syntax like `^[text](key: value, otherKey: otherValue)`.

get · iOS 16.0+

appliesSourcePositionAttributes

TypeScript
get appliesSourcePositionAttributes(): boolean
Swift declaration
var appliesSourcePositionAttributes: Bool

A Boolean value that indicates whether parsing applies attributes that indicate the position of attributed text in the original Markdown string.

set · iOS 16.0+

appliesSourcePositionAttributes

TypeScript
set appliesSourcePositionAttributes(value: boolean)
Swift declaration
var appliesSourcePositionAttributes: Bool

A Boolean value that indicates whether parsing applies attributes that indicate the position of attributed text in the original Markdown string.

Skipped declarations

No declarations were skipped in this snapshot.

All Foundation types →