indentAmount(indentAmount:)
Set the indent amount for pretty printing
@discardableResult func indentAmount(indentAmount: UInt) -> OutputSettings
<param>
<return>
Set the indent amount for pretty printing
@discardableResult func indentAmount(indentAmount: UInt) -> OutputSettings
<param>
<return>
import SwiftSoup
class OutputSettings
@frozen struct UInt
An unsigned integer value type.
init()
func charset() -> String.Encoding
@discardableResult func charset(_ e: String.Encoding) -> OutputSettings
func copy(with zone: NSZone? = nil) -> Any
func encoder() -> String.Encoding
Get the document’s current output charset, which is used to control which characters are escaped when generating HTML (via the html()
methods), and which are kept intact.
@discardableResult func encoder(_ encoder: String.Encoding) -> OutputSettings
Update the document’s output charset.
func escapeMode() -> Entities.EscapeMode
Get the document’s current HTML escape mode: base
, which provides a limited set of named HTML entities and escapes other characters as numbered entities for maximum compatibility; or extended
, which uses the complete set of HTML named entities.
@discardableResult func escapeMode(_ escapeMode: Entities.EscapeMode) -> OutputSettings
Set the document’s escape mode, which determines how characters are escaped when the output character set does not support a given character:- using either a named or a numbered escape.
func indentAmount() -> UInt
Get the current tag indent amount, used when pretty printing.
func outline() -> Bool
Get if outline mode is enabled. Default is false. If enabled, the HTML output methods will consider all tags as block.
@discardableResult func outline(outlineMode: Bool) -> OutputSettings
Enable or disable HTML outline mode.
func prettyPrint() -> Bool
Get if pretty printing is enabled. Default is true. If disabled, the HTML output methods will not re-format the output, and the output will generally look like the input.
@discardableResult func prettyPrint(pretty: Bool) -> OutputSettings
Enable or disable pretty printing.
func syntax() -> Syntax
Get the document’s current output syntax.
@discardableResult func syntax(syntax: Syntax) -> OutputSettings
Set the document’s output syntax. Either {@code html}, with empty tags and boolean attributes (etc), or {@code xml}, with self-closing tags.
enum Syntax
The output serialization syntax.