Skip to content

Commit 1cadb1d

Browse files
committed
Add some docs
1 parent 908b24c commit 1cadb1d

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

lib/index.js

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
* @typedef {Literal & {type: 'comment', value: {stitch: UnistNode}}} Stitch
2121
*
2222
* @typedef Options
23-
* @property {Array.<string>} passThrough
23+
* @property {Array.<string>} passThrough List of custom hast node types to pass through (keep) in hast. If the passed through nodes have children, those children are expected to be hast and will be handled
2424
*
2525
* @typedef HiddenTokenizer
2626
* @property {Array.<HiddenLocationTracker>} __mixins Way too simple, but works for us.
@@ -85,9 +85,12 @@ var doctypeToken = 'DOCTYPE_TOKEN'
8585
var parseOptions = {sourceCodeLocationInfo: true, scriptingEnabled: false}
8686

8787
/**
88-
* @param {Node} tree
89-
* @param {VFile} [file]
90-
* @param {Options} [options]
88+
* Given a hast tree and an optional vfile (for positional info), return a new
89+
* parsed-again hast tree.
90+
*
91+
* @param {Node} tree Original hast tree
92+
* @param {VFile} [file] Virtual file for positional info
93+
* @param {Options} [options] Configuration
9194
*/
9295
export function raw(tree, file, options) {
9396
var index = -1

0 commit comments

Comments
 (0)