55[ ![ Downloads] [ downloads-badge ]] [ downloads ]
66[ ![ Chat] [ chat-badge ]] [ chat ]
77
8- Transform [ MDAST ] [ ] to [ HAST ] [ ] .
8+ Transform [ mdast ] [ ] to [ hast ] [ ] .
99
1010> ** Note** : You probably want to use [ remark-rehype] [ ] .
1111
@@ -32,13 +32,13 @@ var inspect = require('unist-util-inspect')
3232var unified = require (' unified' )
3333var parse = require (' remark-parse' )
3434var vfile = require (' to-vfile' )
35- var toHAST = require (' mdast-util-to-hast' )
35+ var toHast = require (' mdast-util-to-hast' )
3636
3737var tree = unified ()
3838 .use (parse)
3939 .parse (vfile .readSync (' example.md' ))
4040
41- console .log (inspect (toHAST (tree)))
41+ console .log (inspect (toHast (tree)))
4242```
4343
4444Which when running with ` node example ` yields:
@@ -54,9 +54,9 @@ root[1] (1:1-2:1, 0-20)
5454
5555## API
5656
57- ### ` toHAST (node[, options])`
57+ ### ` toHast (node[, options])`
5858
59- Transform the given [ MDAST ] [ ] tree to a [ HAST ] [ ] tree.
59+ Transform the given [ mdast ] [ ] tree to a [ hast ] [ ] tree.
6060
6161##### Options
6262
@@ -72,7 +72,7 @@ are found. The default behaviour is to prefer the last duplicate definition.
7272
7373###### ` options.handlers `
7474
75- Object mapping [ MDAST nodes] [ mdast ] to functions handling those elements.
75+ Object mapping [ mdast nodes] [ mdast ] to functions handling those elements.
7676Take a look at [ ` lib/handlers/ ` ] [ handlers ] for examples.
7777
7878##### Returns
@@ -86,17 +86,17 @@ Take a look at [`lib/handlers/`][handlers] for examples.
8686* [ ` position ` ] [ unist-position ] s are properly patched
8787* Unknown nodes with ` children ` are transformed to ` div ` elements
8888* Unknown nodes with ` value ` are transformed to ` text ` nodes
89- * [ ` node.data.hName ` ] [ hname ] configures the HAST element’s tag-name
90- * [ ` node.data.hProperties ` ] [ hproperties ] is mixed into the HAST element’s
89+ * [ ` node.data.hName ` ] [ hname ] configures the hast element’s tag-name
90+ * [ ` node.data.hProperties ` ] [ hproperties ] is mixed into the hast element’s
9191 properties
92- * [ ` node.data.hChildren ` ] [ hchildren ] configures the HAST element’s children
92+ * [ ` node.data.hChildren ` ] [ hchildren ] configures the hast element’s children
9393
9494##### Examples
9595
9696###### ` hName `
9797
9898` node.data.hName ` sets the tag-name of an element.
99- The following [ MDAST ] [ ] :
99+ The following [ mdast ] [ ] :
100100
101101``` js
102102{
@@ -106,7 +106,7 @@ The following [MDAST][]:
106106}
107107```
108108
109- Yields, in [ HAST ] [ ] :
109+ Yields, in [ hast ] [ ] :
110110
111111``` js
112112{
@@ -120,7 +120,7 @@ Yields, in [HAST][]:
120120###### ` hProperties `
121121
122122` node.data.hProperties ` in sets the properties of an element.
123- The following [ MDAST ] [ ] :
123+ The following [ mdast ] [ ] :
124124
125125``` js
126126{
@@ -132,7 +132,7 @@ The following [MDAST][]:
132132}
133133```
134134
135- Yields, in [ HAST ] [ ] :
135+ Yields, in [ hast ] [ ] :
136136
137137``` js
138138{
@@ -150,7 +150,7 @@ Yields, in [HAST][]:
150150###### ` hChildren `
151151
152152` node.data.hChildren ` sets the children of an element.
153- The following [ MDAST ] [ ] :
153+ The following [ mdast ] [ ] :
154154
155155``` js
156156{
@@ -171,7 +171,7 @@ The following [MDAST][]:
171171}
172172```
173173
174- Yields, in [ HAST ] [ ] (** note** : the ` pre ` and ` language-js ` class are normal
174+ Yields, in [ hast ] [ ] (** note** : the ` pre ` and ` language-js ` class are normal
175175` mdast-util-to-hast ` functionality):
176176
177177``` js
@@ -199,11 +199,11 @@ Yields, in [HAST][] (**note**: the `pre` and `language-js` class are normal
199199## Related
200200
201201* [ ` mdast-util-to-nlcst ` ] ( https://github.com/syntax-tree/mdast-util-to-nlcst )
202- — Transform MDAST to NLCST
202+ — Transform mdast to nlcst
203203* [ ` hast-util-sanitize ` ] ( https://github.com/syntax-tree/hast-util-sanitize )
204- — Sanitize HAST nodes
204+ — Sanitize hast nodes
205205* [ ` hast-util-to-mdast ` ] ( https://github.com/syntax-tree/hast-util-to-mdast )
206- — Transform HAST to MDAST
206+ — Transform hast to mdast
207207* [ ` remark-rehype ` ] ( https://github.com/remarkjs/remark-rehype )
208208 — rehype support for remark
209209* [ ` rehype-remark ` ] ( https://github.com/rehypejs/rehype-remark )
0 commit comments