-
Notifications
You must be signed in to change notification settings - Fork 141
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
Prettier autoformat breaks TurboConsoleLog #17
Comments
Hello, Thank you very much for bringing up this issue; The log messages were inserted each with a transparent character to mark them for commenting, uncommenting and deleting; Apparently prettier remove the transparent characters while formatting the files, so in order to solve the issue once for all i decided to change the log message format to the following: console.log('TCL: SelectedVariableEnclosingClassName -> SelectedVariableEnclosingFunctionName -> SelectedVariable', SelectedVariable). Thx again and happy coding. |
Hi @Chakroun-Anas, Thanks for the update, still it does not seem to fix the issue :/ Given this code :
When I save it, prettier re-formats it to :
Then after that, TurboConsoleLog does not recognize this log anymore thus it's not possible to comment/uncomment or delete via the extension. |
Hello @jon301 , Thank you for your feedback, this is really a big deal so i promise that i will work on it soon. |
Hello, I have just published an update that ensure the compatibilty with prettier. Please check again so that we can close this issue. |
Hi @Chakroun-Anas Thanks <3 |
I configured the preitter, but still have the same problem. TurboConsoleLog does not recognize this log anymore thus it's not possible to comment/uncomment or delete via the extension,Even though 'console.log()'show on one line. As you said:
I think that's the problem,too.
Thank you! |
Changing the quote to the one that prettier's using fixed the issue for me: Maybe we could make the behavior more generic as it seems to rely on the quote style used. |
Hi
I noticed that sometimes, if the
console.log
statement is very long then Prettier autoformats the statement in multiple linesIt looks like TurboConsoleLog is not able to track those
console.log
anymore, meaning that Comment All | Uncomment All | Delete All comments does not affect thoseconsole.log
formatted by Prettier.A workaround would be to able to define a custom prefix for each
console.log
, something likeWhat do you think ?
Thanks for this very handy extension ! 👍
The text was updated successfully, but these errors were encountered: