From 283997b609902b626753db2566a63a0d08ccae14 Mon Sep 17 00:00:00 2001 From: J S Date: Thu, 21 Dec 2023 01:47:21 -0500 Subject: [PATCH] feat[read] Updated split-line regex I updated the regex used in split-line to account for and discard comments. I also updated it to account for multiple = signs, such as in environment variable definitions. --- src/read.lisp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/read.lisp b/src/read.lisp index 985c413..79ad2ff 100644 --- a/src/read.lisp +++ b/src/read.lisp @@ -39,7 +39,7 @@ This list maps section names to hash-tables of the settings in the section." "Split the given key=value line into an associated pair and add it to the given hash-table" - (ppcre:register-groups-bind (systemd-variable setting-value ) ("(.*)=(.*)" line) + (ppcre:register-groups-bind (systemd-variable setting-value ) ("^(?!#)([^=]*)=(.*)" line) (if (string/= setting-value "nil") (setf (gethash systemd-variable value-table ) setting-value ) (remhash systemd-variable value-table))))