MultiLineFragment

public class MultiLineFragment : Fragment

A MultiLineFragment represents a multiple lines of Swift code where the children are indented under its content

  • The content of the MultiLineFragment

    Declaration

    Swift

    public let content: String
  • The CodeFragmentType instances that will be indented in a newline below this MultiLineFragment’s content

    Declaration

    Swift

    public let children: [Fragment]
  • The parent of this MultiCodeFragment, if there is one. Helps determine the level of indentation needed to render this MultiCodeFragment’s content and children

    Declaration

    Swift

    public weak var parent: MultiLineFragment?
  • The string used to prefix the content of the String rendered by this MultiLineFragment

    Declaration

    Swift

    public var indent: String
  • A MultiLineFragment represents a multiple lines of Swift code

    Declaration

    Swift

    @inlinable
    public init(_ content: String, @CodeBuilder _ builder: () -> CodeRepresentable)

    Parameters

    content

    The content of this MultiLineFragment.

    builder

    The CodeFragments to be nested under this MultiLineFragment’s content.

  • Declaration

    Swift

    @inlinable
    public func renderContent() -> String