From 7ec541ae2cc92814053373ebe7f5484ffd38d732 Mon Sep 17 00:00:00 2001 From: Ron Parker Date: Wed, 19 Nov 2025 10:12:39 -0500 Subject: [PATCH] Editorconfig: Fix parsing section lines with trailing comments (#363) Copyright-paperwork-exempt: yes * lisp/editorconfig-core-handle.el (editorconfig-core-handle--parse-file): Fix parsing section lines with trailing comments. Cherrypick of commit 183cfa105c2e from upstream. --- lisp/editorconfig-core-handle.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/editorconfig-core-handle.el b/lisp/editorconfig-core-handle.el index 0849b7bbefd..b75568dbde9 100644 --- a/lisp/editorconfig-core-handle.el +++ b/lisp/editorconfig-core-handle.el @@ -177,7 +177,7 @@ If CONF is not found return nil." nil) ;; Start of section - ((looking-at "\\[\\(.*\\)\\][ \t]*$") + ((looking-at "\\[\\(.*\\)\\][ \t]*\\(?:[#;].*\\)?$") (let ((newpattern (match-string 1))) (when pattern (push (make-editorconfig-core-handle-section