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

Oddly formatted Turf.js jsDoc comments not removed #33

Open
backspaces opened this issue Jul 18, 2021 · 2 comments
Open

Oddly formatted Turf.js jsDoc comments not removed #33

backspaces opened this issue Jul 18, 2021 · 2 comments

Comments

@backspaces
Copy link

I have no idea why, but Turf.js's jsDoc comments have multiple initial spaces after the initial /**:

/**
     * Earth Radius used with the Harvesine formula and approximates using a spherical (non-ellipsoid) Earth.
     *
     * @memberof helpers
     * @type {number}
     */

This causes cleanup({ comments: 'none' }), to not remove them.

Is there a reasonable way for cleanup() to handle this?

Or could you post a regex that just might work? I tried it but my regex fu is lacking! :)

@backspaces
Copy link
Author

Oh, forgot: I get the Turf modules from unpkg using the urlResolve plugin, like this:

https://unpkg.com/@turf/[email protected]/dist/es/index.js?module
https://unpkg.com/@turf/boolean-point-in-polygon?module
...and so on

@backspaces
Copy link
Author

Note: I just did the same thing with skypack and it apparently did not have the odd format, so cleanup worked like a charm!

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