Skip to content

Commit 2cf6094

Browse files
committed
Update readme.md to reflect stable rehype
1 parent c3395d3 commit 2cf6094

File tree

1 file changed

+26
-37
lines changed

1 file changed

+26
-37
lines changed

readme.md

Lines changed: 26 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -4,21 +4,13 @@
44

55
***
66

7-
> :information_desk_person: I’m working on **rehype**, which uses
8-
> this format. A very alpha version of rehype was previously
9-
> published here as `hast`. It’s still published on
10-
> [npm](http://npmjs.com/hast) though. **rehype** will be published
11-
> soon.
12-
>
13-
> Early feedback is greatly appreciated!
14-
157
**HAST** discloses HTML as an abstract syntax tree. _Abstract_
168
means not all information is stored in this tree and an exact replica
179
of the original document cannot be re-created. _Syntax Tree_ means syntax
1810
**is** present in the tree, thus an exact syntactic document can be
1911
re-created.
2012

21-
The reason for introducing a new “virtual” DOM is manyfold, primarily:
13+
The reason for introducing a new “virtual” DOM is primarily:
2214

2315
* The DOM is very heavy to implement outside of the browser;
2416
a lean, stripped down virtual DOM can be used everywhere;
@@ -30,62 +22,49 @@ The reason for introducing a new “virtual” DOM is manyfold, primarily:
3022

3123
* Neither HTML nor virtual DOMs focus on positional information.
3224

33-
**HAST** is a subset of [Unist][].
34-
35-
## List of Utilities
25+
**HAST** is a subset of [Unist][], and implemented by [rehype][].
3626

37-
<!-- Special -->
27+
This document describes version 0.1.0 of **HAST**. [Changelog »][changelog].
3828

39-
* [`wooorm/hastscript`](https://github.com/wooorm/hastscript)
40-
— Hyperscript compatible DSL for creating nodes;
29+
## List of Utilities
4130

42-
* [`wooorm/hast-to-hyperscript`](https://github.com/wooorm/hast-to-hyperscript)
43-
— Convert a HAST Node through to React, Virtual DOM, Hyperscript, and more;
31+
<!--lint disable list-item-spacing-->
4432

4533
<!--
46-
Normal utilities. Sorted alphabetically based on content
47-
after `hast-util-`
34+
Utilities. The first two are special. The rest is sorted
35+
alphabetically based on content after `hast-util-`
4836
-->
4937

38+
* [`wooorm/hastscript`](https://github.com/wooorm/hastscript)
39+
— Hyperscript compatible DSL for creating nodes;
40+
* [`wooorm/hast-to-hyperscript`](https://github.com/wooorm/hast-to-hyperscript)
41+
— Convert a Node to React, Virtual DOM, Hyperscript, and more;
5042
* [`wooorm/hast-util-embedded`](https://github.com/wooorm/hast-util-embedded)
5143
— Check if a node is embedded content;
52-
5344
* [`wooorm/hast-util-has-property`](https://github.com/wooorm/hast-util-has-property)
5445
— Check if a node has a property;
55-
5646
* [`wooorm/hast-util-heading`](https://github.com/wooorm/hast-util-heading)
5747
— Check if a node is heading content;
58-
5948
* [`wooorm/hast-util-interactive`](https://github.com/wooorm/hast-util-interactive)
6049
— Check if a node is interactive;
61-
6250
* [`wooorm/hast-util-is-element`](https://github.com/wooorm/hast-util-is-element)
6351
— Check if a node is a (certain) element;
64-
6552
* [`wooorm/hast-util-labelable`](https://github.com/wooorm/hast-util-labelable)
6653
— Check if a node is labelable;
67-
6854
* [`wooorm/hast-util-menu-state`](https://github.com/wooorm/hast-util-menu-state)
6955
— Check the state of a menu element;
70-
7156
* [`wooorm/hast-util-parse-selector`](https://github.com/wooorm/hast-util-parse-selector)
7257
— Create a node from a simple CSS selector;
73-
7458
* [`wooorm/hast-util-sanitize`](https://github.com/wooorm/hast-util-sanitize)
7559
— Sanitise nodes;
76-
7760
* [`wooorm/hast-util-script-supporting`](https://github.com/wooorm/hast-util-script-supporting)
7861
— Check if a node is script-supporting content;
79-
8062
* [`wooorm/hast-util-sectioning`](https://github.com/wooorm/hast-util-sectioning)
8163
— Check if a node is sectioning content;
82-
8364
* [`wooorm/hast-util-to-html`](https://github.com/wooorm/hast-util-to-html)
8465
— Stringify nodes to HTML;
85-
8666
* [`wooorm/hast-util-transparent`](https://github.com/wooorm/hast-util-transparent)
8767
— Check if a node is transparent content;
88-
8968
* [`wooorm/hast-util-whitespace`](https://github.com/wooorm/hast-util-whitespace)
9069
— Check if a node is inter-element whitespace;
9170

@@ -189,15 +168,15 @@ The DOM is strict in reflecting those properties, and HAST is not,
189168
where the DOM treats `<div hidden=no></div>` as having a `true`
190169
(boolean) value for the `hidden` attribute, and `<img width="yes">`
191170
as having a `0` (number) value for the `width` attribute, these should
192-
be reflected as `"no"` and `"yes"`, respectively, in HAST.
171+
be reflected as `'no'` and `'yes'`, respectively, in HAST.
193172

194173
> The reason for this is to allow plug-ins and utilities to inspect
195174
> these values.
196175
197176
The DOM also specifies comma- and space-separated lists attribute
198177
values. In HAST, these should be treated as ordered lists. For example,
199178
`<div class="alpha bravo"></div>` is represented as
200-
`["alpha", "bravo"]`.
179+
`['alpha', 'bravo']`.
201180

202181
> There’s no special format for `style`.
203182
@@ -313,15 +292,17 @@ Yields:
313292

314293
## Related
315294

295+
* [rehype][]
316296
* [Unist][]
317-
* [vfile][]
318-
* rehype
297+
* [VFile][]
298+
* [NLCST][]
299+
* [MDAST][]
319300

320301
<!-- Definitions -->
321302

322303
[logo]: https://cdn.rawgit.com/wooorm/hast/master/logo.svg
323304

324-
[vfile]: https://github.com/wooorm/vfile
305+
[changelog]: https://github.com/wooorm/hast/releases
325306

326307
[html-element]: https://dom.spec.whatwg.org/#interface-element
327308

@@ -333,4 +314,12 @@ Yields:
333314

334315
[text]: https://github.com/wooorm/unist#text
335316

317+
[rehype]: https://github.com/wooorm/rehype
318+
319+
[nlcst]: https://github.com/wooorm/nlcst
320+
321+
[mdast]: https://github.com/wooorm/mdast
322+
323+
[vfile]: https://github.com/wooorm/vfile
324+
336325
[properties]: #properties

0 commit comments

Comments
 (0)