diff --git a/readme.md b/readme.md index c3a7d44..cf80efe 100644 --- a/readme.md +++ b/readme.md @@ -12,20 +12,36 @@ ## Contents -* [What is this?](#what-is-this) -* [When should I use this?](#when-should-i-use-this) -* [Install](#install) -* [Use](#use) -* [API](#api) - * [`defaultSchema`](#defaultschema) - * [`sanitize(tree[, options])`](#sanitizetree-options) - * [`Schema`](#schema) -* [Types](#types) -* [Compatibility](#compatibility) -* [Security](#security) -* [Related](#related) -* [Contribute](#contribute) -* [License](#license) +- [hast-util-sanitize](#hast-util-sanitize) + - [Contents](#contents) + - [What is this?](#what-is-this) + - [When should I use this?](#when-should-i-use-this) + - [Install](#install) + - [Use](#use) + - [API](#api) + - [`defaultSchema`](#defaultschema) + - [Overriding the default schema](#overriding-the-default-schema) + - [`sanitize(tree[, options])`](#sanitizetree-options) + - [Parameters](#parameters) + - [Returns](#returns) + - [`Schema`](#schema) + - [Fields](#fields) + - [`allowComments`](#allowcomments) + - [`allowDoctypes`](#allowdoctypes) + - [`ancestors`](#ancestors) + - [`attributes`](#attributes) + - [`clobber`](#clobber) + - [`clobberPrefix`](#clobberprefix) + - [`protocols`](#protocols) + - [`required`](#required) + - [`strip`](#strip) + - [`tagNames`](#tagnames) + - [Types](#types) + - [Compatibility](#compatibility) + - [Security](#security) + - [Related](#related) + - [Contribute](#contribute) + - [License](#license) ## What is this? @@ -124,7 +140,89 @@ There is no default export. Default schema ([`Schema`][api-schema]). -Follows [GitHub][] style sanitation. +Follows [GitHub][] style sanitation. + +#### Overriding the default schema + +In some cases, it may be necessary to override the default schema. +In the example below, the `id` attribute of the `