commit 7c65529fc9956f9f483c0cf8df6d322b73bf0ef3
parent f9736c3afa16a8d3ddbc38385008712daf53061c
Author: Florian Dold <dold@taler.net>
Date: Tue, 21 Jul 2026 13:17:03 +0200
util: accept % as a config comment introducer
configuration.c treats both '#' and '%' as comment introducers. Here a '%'
line reached the parse error, or became a live option when it contained an
"=".
Diffstat:
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/packages/taler-util/src/talerconfig.ts b/packages/taler-util/src/talerconfig.ts
@@ -487,7 +487,8 @@ export class Configuration {
): void {
let lineNo = 0;
const fn = opts.filename ?? "<input>";
- const reComment = /^\s*#.*$/;
+ // Both "#" and "%" introduce a comment, as in configuration.c.
+ const reComment = /^\s*[#%].*$/;
const reSection = /^\s*\[\s*([^\]]*?)\s*\]\s*$/;
const reParam = /^\s*([^=]+?)\s*=\s*(.*?)\s*$/;
const reDirective = /^\s*@([a-zA-Z-_]+)@\s*(.*?)\s*$/;