Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Documentation for strip.parse is an incorrect copy-paste of strip.block #56

Open
papb opened this issue Jun 26, 2020 · 0 comments
Open

Comments

@papb
Copy link

papb commented Jun 26, 2020

The documentation for strip.parse is an incorrect copy-paste of strip.block:

strip-comments/index.js

Lines 100 to 116 in 8b26809

/**
* Parses a string and returns a basic CST (Concrete Syntax Tree).
*
* ```js
* const strip = require('..');
* const str = strip.block('const foo = "bar";// this is a comment\n /* me too *\/');
* console.log(str);
* // => 'const foo = "bar";// this is a comment'
* ```
* @name .block
* @param {String} `input` string from which to strip comments
* @param {Object} `options` pass `opts.keepProtected: true` to keep ignored comments (e.g. `/*!`)
* @return {String} modified string
* @api public
*/
strip.parse = parse;

Apparently only the summary is correct:

Parses a string and returns a basic CST (Concrete Syntax Tree).

See it in readme

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant