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

Embedded JS should change the comment prefix to // #12

Open
bedge opened this issue Nov 29, 2023 · 0 comments
Open

Embedded JS should change the comment prefix to // #12

bedge opened this issue Nov 29, 2023 · 0 comments

Comments

@bedge
Copy link

bedge commented Nov 29, 2023

Just started using the embedded JS feature. This is fantastic. Thank you for the plugin.
One thing I noticed is the "comment line" function, Cmd-/, prefixes the line with #, not //.
While the # would be a correct YAML comment, it would only be so if it were on column 1, but it's not, it's at the leading edge of the JS code, where, in this context it needs to be a // to be a legally interpreted JS comment.
(At least, that's the case for GitHub actions JS embedded in YAML: https://github.com/actions/github-script)

eg:
What "comment line" does now, with JS embedded in YAML:
image

For the YAML comment case, this should be:

image

For the JS case it should be:

image

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