##// END OF EJS Templates
config: deal with spaces at end of line more carefully
Matt Mackall -
r8192:5fd8e60a default
parent child Browse files
Show More
@@ -69,11 +69,11 b' class config(object):'
69
69
70 def read(self, path, fp=None):
70 def read(self, path, fp=None):
71 sectionre = re.compile(r'\[([^\[]+)\]')
71 sectionre = re.compile(r'\[([^\[]+)\]')
72 itemre = re.compile(r'([^=\s]+)\s*=\s*(.*)')
72 itemre = re.compile(r'([^=\s]+)\s*=\s*(.*\S|)')
73 contre = re.compile(r'\s+(\S.*)')
73 contre = re.compile(r'\s+(\S.*\S)')
74 emptyre = re.compile(r'(;|#|\s*$)')
74 emptyre = re.compile(r'(;|#|\s*$)')
75 unsetre = re.compile(r'%unset\s+(\S.*)')
75 unsetre = re.compile(r'%unset\s+(\S+)')
76 includere = re.compile(r'%include\s+(\S.*)')
76 includere = re.compile(r'%include\s+(\S.*\S)')
77 section = ""
77 section = ""
78 item = None
78 item = None
79 line = 0
79 line = 0
General Comments 0
You need to be logged in to leave comments. Login now