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
M - ; comments not closing #589
Comments
@seanareed I do not plan to provide this kind of comments ... perhaps someone could provide a function (ask on stackoverflow) |
Ok. Thanks. I may take a stab at it myself. Cheers, S |
It also does this now when editing javascript too. If I set web-mode-set-content-type to jsx in js buffer then it closes the comment properly. |
Thanks! Is there a way to add something to the init file that automatically sets this on opening php files? |
Setting wrong content type on a buffer is a useful workaround, but this is still broken, inserts /*. Should this issue really be closed? |
as I wrote in my first comment, I do not plan to work on this. Perhaps someone could write a minor mode to handle this |
I looked at the diffs from the commit to web-mode.el on 15-Sep-2015 ('jsx commenting'), which is when I noticed the change in behavior. The original code had a (not ) that is missing in the new code. I don't know if this was intentional or an oversight. However, adding that (not ) back in returns the proper closing behavior that was present before. Changing line 8302 in the added code (green) to (not (string= alt "/*"))) remedies the issue for me. -S |
(...however, I have to evaluate the web-mode.el buffer for it to take effect.) |
(...ah, yes... the .el library must be byte-compiled first... there is an .elc version.) |
@seanareed it works for me, thanks a lot. |
I recently upgraded web-mode.
I use it with PHP, and love it.
Since then, the M - ; shortcut for comments doesn't close those comments in a PHP block within web-mode.
Is it possible that this is due to a change in web-mode?
I'm attaching images of what it used to do and what it does now.
Thanks,
Sean
The text was updated successfully, but these errors were encountered: