Escape values in default config comments

This commit is contained in:
Florian Bruhin 2014-05-02 11:30:51 +02:00
parent cb0d0d1af2
commit be86ca03e2

View File

@ -192,8 +192,10 @@ class ConfigManager(QObject):
else:
lines += wrapper.wrap("Valid values: {}".format(', '.join(
valid_values)))
lines += wrapper.wrap("Default: {}".format(
option.values['default']))
default = option.values['default']
for c in self.VALUE_ESCAPE:
default = default.replace(c, self.ESCAPE_CHAR + c)
lines += wrapper.wrap("Default: {}".format(default))
return lines
def _str_items(self, section):