mirror of
https://github.com/scorpion-26/gBar.git
synced 2024-11-22 11:12:49 +00:00
Add support for string escaping
This is needed for spaces at the end of variables
This commit is contained in:
parent
8b8ce501d4
commit
1f4f84093a
2 changed files with 3 additions and 1 deletions
|
@ -8,8 +8,9 @@
|
||||||
# - After the value
|
# - After the value
|
||||||
#
|
#
|
||||||
# String variables can be escaped ([Notation in config] -> "Result"):
|
# String variables can be escaped ([Notation in config] -> "Result"):
|
||||||
# - foo\\bar -> "foo<backspace>bar"
|
# - foo\\bar -> "foo<backlash>bar"
|
||||||
# - foo\nbar -> "foo<newline>bar"
|
# - foo\nbar -> "foo<newline>bar"
|
||||||
|
# - foo\sbar -> "foo bar"
|
||||||
|
|
||||||
# The following three options control the ordering of the widgets.
|
# The following three options control the ordering of the widgets.
|
||||||
# Reordering can cause slight margin inconsistencies,
|
# Reordering can cause slight margin inconsistencies,
|
||||||
|
|
|
@ -23,6 +23,7 @@ void ApplyProperty<std::string>(std::string& propertyToSet, const std::string_vi
|
||||||
Utils::Replace(propertyToSet, "\\n", "\n");
|
Utils::Replace(propertyToSet, "\\n", "\n");
|
||||||
Utils::Replace(propertyToSet, "\\\\", "\\");
|
Utils::Replace(propertyToSet, "\\\\", "\\");
|
||||||
Utils::Replace(propertyToSet, "\\t", "\t");
|
Utils::Replace(propertyToSet, "\\t", "\t");
|
||||||
|
Utils::Replace(propertyToSet, "\\s", " ");
|
||||||
}
|
}
|
||||||
|
|
||||||
template<>
|
template<>
|
||||||
|
|
Loading…
Reference in a new issue