FormatSmartOptions: {
    attribute?: boolean;
    omitOptionalSemicolons?: boolean;
    useNamedReferences?: boolean;
    useShortestReferences?: boolean;
}

Type declaration

  • Optional attribute?: boolean

    Create character references which don’t fail in attributes. Note: attribute only applies when operating dangerously with omitOptionalSemicolons: true.

  • Optional omitOptionalSemicolons?: boolean

    Whether to omit semicolons when possible. Note: This creates what HTML calls “parse errors” but is otherwise still valid HTML — don’t use this except when building a minifier. Omitting semicolons is possible for certain named and numeric references in some cases.

  • Optional useNamedReferences?: boolean

    Prefer named character references (&) where possible.

  • Optional useShortestReferences?: boolean

    Prefer the shortest possible reference, if that results in less bytes. Note: useNamedReferences can be omitted when using useShortestReferences.