equal
deleted
inserted
replaced
71 self._source[(section, item)] = source |
71 self._source[(section, item)] = source |
72 |
72 |
73 def parse(self, src, data, sections=None, remap=None, include=None): |
73 def parse(self, src, data, sections=None, remap=None, include=None): |
74 sectionre = re.compile(r'\[([^\[]+)\]') |
74 sectionre = re.compile(r'\[([^\[]+)\]') |
75 itemre = re.compile(r'([^=\s][^=]*?)\s*=\s*(.*\S|)') |
75 itemre = re.compile(r'([^=\s][^=]*?)\s*=\s*(.*\S|)') |
76 contre = re.compile(r'\s+(\S.*\S)') |
76 contre = re.compile(r'\s+(\S|\S.*\S)\s*$') |
77 emptyre = re.compile(r'(;|#|\s*$)') |
77 emptyre = re.compile(r'(;|#|\s*$)') |
78 unsetre = re.compile(r'%unset\s+(\S+)') |
78 unsetre = re.compile(r'%unset\s+(\S+)') |
79 includere = re.compile(r'%include\s+(\S.*\S)') |
79 includere = re.compile(r'%include\s+(\S|\S.*\S)\s*$') |
80 section = "" |
80 section = "" |
81 item = None |
81 item = None |
82 line = 0 |
82 line = 0 |
83 cont = False |
83 cont = False |
84 |
84 |