[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/phps-mode e81c0fcfe9 3/5: Fixed issue with endless loop
From: |
Christian Johansson |
Subject: |
[elpa] externals/phps-mode e81c0fcfe9 3/5: Fixed issue with endless loop when indenting some peculiar strings |
Date: |
Tue, 1 Feb 2022 11:42:10 -0500 (EST) |
branch: externals/phps-mode
commit e81c0fcfe9bc80b9528c581ea1aeacd231932ed1
Author: Christian Johansson <christian@cvj.se>
Commit: Christian Johansson <christian@cvj.se>
Fixed issue with endless loop when indenting some peculiar strings
---
TODO.md | 21 ---------------------
phps-mode-indent.el | 2 +-
2 files changed, 1 insertion(+), 22 deletions(-)
diff --git a/TODO.md b/TODO.md
index ca8082fcd9..bc46248af3 100644
--- a/TODO.md
+++ b/TODO.md
@@ -1,26 +1,5 @@
# TODO
-## Indentation
-
-* Endless loop
-
-<?php
-
-namespace Vendor\Module;
-
-class myClass implements \My\NamespaceInterface
-{
- public function __construct()
- {
-
- }
-}
-
-Depends on Emacs error with code:
-
-(string-match-p "[
]*implements[
]+\\([
]*[\\a-zA-Z_0-9_]+,?\\)+[
]*{$" "ariable implements
\\Magento\\Framework\\Event\\OberserverInterface
{
public function __construct()
")
-
-
## Code intelligence
* Bookkeeping of chained object operators like WC()->cart->subtotal
diff --git a/phps-mode-indent.el b/phps-mode-indent.el
index f7becc516d..58a2e2bf0c 100644
--- a/phps-mode-indent.el
+++ b/phps-mode-indent.el
@@ -725,7 +725,7 @@
current-line-starts-with-opening-bracket
(string= current-line-starts-with-opening-bracket "{")
(phps-mode-indent--backwards-looking-at
- "[\r\t ]*implements[\r\t ]+\\([\r\t
]*[\\a-zA-Z_0-9_]+,?\\)+[\r\t ]*{$")
+ "[\r\t ]+implements\\([\r\t ]+[\\a-zA-Z_0-9_]+,?\\)+[\r\t
]*{$")
(not
(string-match-p
"[\t ]*\\(class\\|interface\\)[\t ]+"