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: else:
lines += wrapper.wrap("Valid values: {}".format(', '.join( lines += wrapper.wrap("Valid values: {}".format(', '.join(
valid_values))) valid_values)))
lines += wrapper.wrap("Default: {}".format( default = option.values['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 return lines
def _str_items(self, section): def _str_items(self, section):