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

Only the console.log calls inserted by this extension should be removed #6

Closed
fabiospampinato opened this issue Mar 13, 2018 · 2 comments

Comments

@fabiospampinato
Copy link

If I execute Delete All Log Messages on this file:

function main () {
  console.log('...');
  const foo = 1;
  console.log('main -> foo', foo);
}

It gets transformed to:

function main () {
  const foo = 1;
}

While it should instead become:

function main () {
  console.log('...');
  const foo = 1;
}

Basically only the console.log calls inserted by this extension should be removed.

One way of doing this would be to prefix all the strings with '[TS]', or something, and then check if that string is present. This would be pretty ugly though. A smarter way, that I think should work, would be to prefix the strings with one (or more) zero-width spaces and then check for those.

@Chakroun-Anas
Copy link
Owner

Hello,

This is a really interesting feature, i ensure you that it will be taken in account.

Thx.

@Chakroun-Anas
Copy link
Owner

Chakroun-Anas commented Mar 14, 2018

The requested feature is implemented, all the features will be applied to just the log messages that were inserted by the extension, including: deleting, commenting and uncommenting.

Thx.

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

2 participants