Skip to content
This repository was archived by the owner on Mar 12, 2022. It is now read-only.

"Comment With Line Comment" Action uses the wrong comment style in @php blocks #264

Open
natepisarski opened this issue Sep 28, 2020 · 0 comments

Comments

@natepisarski
Copy link

I frequently use the 'Comment With Line Comment' command in Idea to turn single-line debugging statements on or off.

For instance, pressing ctrl+// on this line:

$comment = 4;

would turn it into this:

//$comment = 4;

The style of the comment changes in different file extensions. In a .blade file it would make this type of line comment:

{{-- $comment = 4; --}}

However, if you use this command within a @php block in Blade, it will continue using the general 'blade' style comment:

  @php 
     $comment = 4; // COMMENT ON THIS LINE
  @endphp

becomes this:

@php
  {{--    $comment = 4; // COMMENT ON THIS LINE--}}
@endphp

This is a syntax error because everything inside the @php will just be interpreted as PHP code, and not pre-processed in Blade.


I'm not sure if it's possible to make the 'Comment With Line Comment' context-sensitive from this plugin. If it's not, feel free to close this issue.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant