rehype-stringify
Advanced tools
Comparing version 9.0.3 to 9.0.4
@@ -1,4 +0,42 @@ | ||
/** @type {import('unified').Plugin<[Options?]|Array<void>, Node, string>} */ | ||
export default function rehypeStringify( | ||
config: void | import('hast-util-to-html/lib/types').Options | undefined | ||
this: | ||
| import('unified').Processor< | ||
void, | ||
import('hast').Root, | ||
import('hast').Root, | ||
string | ||
> | ||
| import('unified').Processor< | ||
void, | ||
import('hast').Comment, | ||
import('hast').Comment, | ||
string | ||
> | ||
| import('unified').Processor< | ||
void, | ||
import('hast').DocType, | ||
import('hast').DocType, | ||
string | ||
> | ||
| import('unified').Processor< | ||
void, | ||
import('hast').Element, | ||
import('hast').Element, | ||
string | ||
> | ||
| import('unified').Processor< | ||
void, | ||
import('hast').Text, | ||
import('hast').Text, | ||
string | ||
> | ||
| import('unified').Processor< | ||
void, | ||
import('hast-util-raw/complex-types.js').Raw, | ||
import('hast-util-raw/complex-types.js').Raw, | ||
string | ||
>, | ||
...settings: | ||
| [(import('hast-util-to-html/lib/types.js').Options | undefined)?] | ||
| void[] | ||
): void | ||
@@ -5,0 +43,0 @@ export type Root = import('hast').Root |
@@ -9,3 +9,6 @@ /** | ||
/** @type {import('unified').Plugin<[Options?]|Array<void>, Node, string>} */ | ||
/** | ||
* @this {import('unified').Processor} | ||
* @type {import('unified').Plugin<[Options?]|Array<void>, Node, string>} | ||
*/ | ||
export default function rehypeStringify(config) { | ||
@@ -12,0 +15,0 @@ const processorSettings = /** @type {Options} */ (this.data('settings')) |
{ | ||
"name": "rehype-stringify", | ||
"version": "9.0.3", | ||
"version": "9.0.4", | ||
"description": "rehype plugin to serialize HTML", | ||
@@ -46,3 +46,3 @@ "license": "MIT", | ||
"scripts": { | ||
"build": "rimraf \"lib/**/*.d.ts\" && tsc && type-coverage" | ||
"build": "tsc --build --clean && tsc --build && type-coverage" | ||
}, | ||
@@ -49,0 +49,0 @@ "xo": false, |
@@ -53,2 +53,8 @@ # rehype-stringify | ||
A different plugin, [`rehype-format`][rehype-format], improves the readability | ||
of HTML source code as it adds insignificant but pretty whitespace between | ||
elements. | ||
There is also the preset [`rehype-minify`][rehype-minify] for when you want the | ||
inverse: minified and mangled HTML. | ||
## Install | ||
@@ -63,13 +69,13 @@ | ||
In Deno with [Skypack][]: | ||
In Deno with [`esm.sh`][esmsh]: | ||
```js | ||
import rehypeStringify from 'https://cdn.skypack.dev/rehype-stringify@9?dts' | ||
import rehypeStringify from 'https://esm.sh/rehype-stringify@9' | ||
``` | ||
In browsers with [Skypack][]: | ||
In browsers with [`esm.sh`][esmsh]: | ||
```html | ||
<script type="module"> | ||
import rehypeStringify from 'https://cdn.skypack.dev/rehype-stringify@9?min' | ||
import rehypeStringify from 'https://esm.sh/rehype-stringify@9?bundle' | ||
</script> | ||
@@ -277,3 +283,3 @@ ``` | ||
HTML is parsed according to WHATWG HTML (the living standard), which is also | ||
HTML is serialized according to WHATWG HTML (the living standard), which is also | ||
followed by browsers such as Chrome and Firefox. | ||
@@ -372,2 +378,6 @@ | ||
<td width="10%" align="center"> | ||
<a href="https://markdown.space">Markdown Space</a><br><br> | ||
<a href="https://markdown.space"><img src="https://images.opencollective.com/markdown-space/e1038ed/logo/128.png" width="64"></a> | ||
</td> | ||
<td width="10%" align="center"> | ||
<a href="https://www.holloway.com">Holloway</a><br><br> | ||
@@ -378,3 +388,2 @@ <a href="https://www.holloway.com"><img src="https://avatars1.githubusercontent.com/u/35904294?s=128&v=4" width="64"></a> | ||
<td width="10%"></td> | ||
<td width="10%"></td> | ||
</tr> | ||
@@ -440,3 +449,3 @@ <tr valign="middle"> | ||
[skypack]: https://www.skypack.dev | ||
[esmsh]: https://esm.sh | ||
@@ -459,2 +468,6 @@ [unified]: https://github.com/unifiedjs/unified | ||
[rehype-format]: https://github.com/rehypejs/rehype-format | ||
[rehype-minify]: https://github.com/rehypejs/rehype-minify | ||
[rehype-dom-stringify]: https://github.com/rehypejs/rehype-dom/tree/main/packages/rehype-dom-stringify | ||
@@ -461,0 +474,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
18634
76
473