lib/spiderfw/config/configuration_editor.rb in spiderfw-0.6.18 vs lib/spiderfw/config/configuration_editor.rb in spiderfw-0.6.19
- old
+ new
@@ -111,11 +111,11 @@
add_next.each do |l|
res << indent + l + "\n"
end
add_next = nil
end
- if line =~ /(\s*)(\w[^:]+):\s*(.+)?$/
+ if line =~ /^(\s*)(\w[^:]+):\s*(.+)?$/
indent = $1
key = $2
value = $3
unless curr_val.empty?
commit_ml(res, last_key, curr_val, curr[last_key])
@@ -173,10 +173,12 @@
commit_ml(res, last_key, curr_val, curr)
curr_val = ""
end
curr = data
res << line
+ elsif line =~ /^\s*#/
+ res << line
else # value line
curr_val << line
end
end
unless curr_val.empty?
@@ -198,6 +200,6 @@
end
end
end
-end
\ No newline at end of file
+end