branch: elpa/web-mode
commit 81c44d52a78ab2844c61f27bd1b916c5184b76e8
Author: fxbois <fxb...@gmail.com>
Commit: fxbois <fxb...@gmail.com>

    blade indent fix
    
    #1318
---
 issues/1318.blade.php | 15 +++++++++++++++
 web-mode.el           |  7 +++++--
 2 files changed, 20 insertions(+), 2 deletions(-)

diff --git a/issues/1318.blade.php b/issues/1318.blade.php
new file mode 100644
index 0000000000..170890530a
--- /dev/null
+++ b/issues/1318.blade.php
@@ -0,0 +1,15 @@
+{{-- <x-web.forms.errors --}}
+
+@props(
+       ['attr_name',
+        'errors',
+        'safe' => false,
+       ])
+
+@foreach ($errors->get($attr_name) as $message)
+  @if($safe === true)
+    <p class="error-style"><span>{!! $message !!}</span></p>
+  @else
+    <p class="error-style"><span>{{ $message }} </span></p>
+  @endif
+@endforeach
diff --git a/web-mode.el b/web-mode.el
index 8e1ab23047..fdd45a30dd 100644
--- a/web-mode.el
+++ b/web-mode.el
@@ -8682,7 +8682,7 @@ Also return non-nil if it is the command 
`self-insert-command' is remapped to."
          (cond
            ((string= web-mode-engine "blade")
             (save-excursion
-              (when (web-mode-rsf "{[{!]+[ ]*")
+              (when (web-mode-rsf "{[{!]+[ ]*\\|@props[ ]*[(]") ;; #1318
                 (setq reg-col (current-column))))
             (setq reg-beg (+ reg-beg 2))
             )
@@ -9647,7 +9647,10 @@ Also return non-nil if it is the command 
`self-insert-command' is remapped to."
                                                               reg-beg))))
 
           (t
-           (when debug (message "I430(%S) bracket-indentation" pos))
+           (when debug
+             (message "I430(%S) bracket-indentation" pos)
+             ;;(message "reg-col=%S curr-ind=%S lang=%S reg-beg=%S" reg-col 
curr-indentation language reg-beg)
+             )
            (setq offset (car (web-mode-bracket-indentation pos
                                                            reg-col
                                                            curr-indentation

Reply via email to