mako icon indicating copy to clipboard operation
mako copied to clipboard

strip `'` and `"` from config

Open yannick opened this issue 6 years ago • 4 comments
trafficstars

note sure if a bug, but took some trial and error to figure it out what was wrong:

when converting from command line to the config file i noticed that the parser fails if e.g. the color is surrounded by quotes. --border-color='#03E7B055' -> border-color='#03E7B055'

(also white spaces at the end of the line cause a fail)

yannick avatar Jan 11 '19 07:01 yannick

Hmm, I'm not a fan of doing this.

(also white spaces at the end of the line cause a fail)

What do you mean by "fail"? Will it print an error and refuse to load the config file?

emersion avatar Jan 11 '19 23:01 emersion

whitespaces: it refuses to load with: [config:1] Failed to parse option 'text-color' which i guess is a quite confusing message.

yannick avatar Jan 15 '19 19:01 yannick

Stripping end-of-line whitespace seems sensible as we're trimming whitespace around = anyway.

Error messages could be improved by printing the whole line.

emersion avatar Jan 15 '19 21:01 emersion

Update: #177 hopefully improved this situation, but I'll leave this open until we do something about the whitespace.

vilhalmer avatar Jul 28 '19 12:07 vilhalmer