question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

@if in html class occurs error

See original GitHub issue

Expected Behavior

@if (count($topics))
  <ul class="list-group border-0">
    @foreach ($topics as $topic)
      <li class="list-group-item border-right-0 border-left-0 @if($loop->first) border-top-0 @endif"></li>
    @endforeach
  </ul>
@endif

Current Behavior

@if (count($topics))
  <ul class="list-group border-0">
    @foreach ($topics as $topic)
      <li class="list-group-item border-right-0 border-left-0 <beautify start=" @if " exp=" ^^^$loop->first^^^">
        border-top-0
    @endif"></li>
@endforeach
</ul>
@endif

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:2
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
vielhubercommented, Jan 8, 2021

Any update on this? This is crucial, as it destroys code.

0reactions
shufocommented, Jan 17, 2021

@vielhuber Thank you for using extension! I would say that VSCode extension is stable in most cases. However, it may become unstable when the open/close of HTML tags and the open/close of blade directive are mixed.

I’ve also seen some issues that it conflicts with other Blade extensions. It is recommended to use it with Syntax highlighter like https://marketplace.visualstudio.com/items?itemName=onecentlin.laravel-blade.

If it still not working, i would appreciate if you report your environment to issues.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Search page for class .has-error - javascript - Stack Overflow
It will check to see if any element has the class .has-error , and if it does not ! exist anywhere on the...
Read more >
Element: error event - Web APIs | MDN
The error event is fired on an Element object when a resource failed to load, or can't be used. For example, if a...
Read more >
JavaScript Errors Try Catch Throw - W3Schools
If the value is wrong, an exception (err) is thrown. The exception (err) is caught by the catch statement and a custom error...
Read more >
if/else condition in CSS - GeeksforGeeks
Method 1: In this method, we will use classes in HTML file to achieve this. We will define different class names according to...
Read more >
error: Class names are only accepted if annotation processing ...
This error occurs when you try to compile your java program and forgot to include .java extension with javac command in CMD. Let's...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found