branch: externals/matlab-mode
commit b21cbcab11a9d72b6d33adffb8f85489a4db2294
Author: John Ciolfi <[email protected]>
Commit: John Ciolfi <[email protected]>
matlab-ts-mode: handle extra \n nodes during indent
---
matlab-ts-mode.el | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/matlab-ts-mode.el b/matlab-ts-mode.el
index af0d22c3e3..e7de855101 100644
--- a/matlab-ts-mode.el
+++ b/matlab-ts-mode.el
@@ -464,9 +464,11 @@ help doc comment."
(let ((prev-node (treesit-node-prev-sibling comment-node)))
(when prev-node
- (while (string-match-p (rx bos "line_continuation" eos)
+
+ (while (string-match-p (rx bos (or "line_continuation" "\n") eos)
(treesit-node-type prev-node))
(setq prev-node (treesit-node-prev-sibling prev-node)))
+
(let ((prev-type (treesit-node-type prev-node)))
;; The true (t) cases. Note line continuation ellipsis are allowed.
;; function foo function foo(a)