For AI agents: the complete documentation index is available at https://canary.gukhanmun.org/llms.txt, the full documentation bundle is available at https://canary.gukhanmun.org/llms-full.txt, and this page is available as Markdown at https://canary.gukhanmun.org/api/js/interfaces/_gukhanmun_types.HtmlOptions.md.

Interface: HtmlOptions

Fine-grained HTML preservation rules passed in GukhanmunOptions.html.

These are additive: a scope is preserved when any rule matches. They correspond to the CLI flags --html-preserve-class and --html-preserve-attr, and to the Rust Builder::html_preserve_when predicate.

Properties

preserveAttributes?

readonly optional preserveAttributes?: readonly (string | { name: string; value?: string; })[]

Attribute matchers; an element is preserved when it carries a matching attribute. Each entry is either:

  • A bare string — preserve any element that has the attribute, regardless of value (e.g. "data-no-translate").
  • An object { name, value? } — preserve elements where the attribute equals value, or has the attribute when value is omitted.

Equivalent to --html-preserve-attr KEY[=VALUE] on the CLI.


preserveClasses?

readonly optional preserveClasses?: readonly string[]

Class names whose containing element (and all descendants) should be treated as a preserved region—the engine skips their text content.

Equivalent to passing --html-preserve-class NAME to the CLI one or more times.