• Re-indent a string by the biggest common indent found. Useful when you want to use HTML to specify text with meaningful whitespace (e.g. in <pre> or <code>) and break neither the flow of the HTML indentation nor the text indentation.

    Parameters

    • text: string

      the content to re-indent

    • indent_: string

      the string to use for indentation (probably use whitespace)

    • skipFirst: boolean = false

      whether to skip the first line (useful for indenting in a template literal)

    Returns string

    the re-indented string

Generated using TypeDoc