From cbc36239d1206580577e6b227a632ba9f161e4f1 Mon Sep 17 00:00:00 2001 From: scorpion-26 Date: Sun, 3 Dec 2023 22:23:32 +0100 Subject: [PATCH] Strip whitespaces for second pair element --- src/Config.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/Config.cpp b/src/Config.cpp index 71cb603..6b580f1 100644 --- a/src/Config.cpp +++ b/src/Config.cpp @@ -99,6 +99,10 @@ void ApplyProperty(std::pair& propertyToSet, const std::string_vi size_t endBefore = before.find_last_not_of(whitespace); before = before.substr(beginBefore, endBefore - beginBefore + 1); + // Strip whitespace for after + size_t beginAfter = after.find_first_not_of(whitespace); + after = after.substr(beginAfter); + ApplyProperty(propertyToSet.first, before); ApplyProperty(propertyToSet.second, after); }