Doubles comments
Closed this issue · 4 comments
VerusK commented
After saving all comment string is doubled in config file.
aborilov commented
yep, same here
peakwinter commented
Could you give me an example of the circumstances under which this occurs? I cannot reproduce it.
Thanks!
aborilov commented
@peakwinter if comment have ';' at the end of line( after someone comment line of config), then this two regexp return true for this line, and because you don't use elif
, you have double comment lines.
if re.match('.*;', line):
if re.match('\s*#\s*', line):
simple config:
server {
# listen 80;
listen 8080;
# some comment
server_name localhost;
}
will double #listen 80;
peakwinter commented
Fixed in 0.2, thanks!