1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-05 22:20:24 -08:00

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.
This commit is contained in:
Ron Parker 2025-11-19 10:12:39 -05:00 committed by Stefan Monnier
parent 5e10b7fe4e
commit 7ec541ae2c

View file

@ -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