diff -u rubber-1.1/debian/changelog rubber-1.1/debian/changelog --- rubber-1.1/debian/changelog +++ rubber-1.1/debian/changelog @@ -1,3 +1,11 @@ +rubber (1.1-2.2ubuntu2) lucid; urgency=low + + * src/rules/latex/__init__.py: + - Use regexp to look for directives, so that comment mark needn't be at + beginning of line (LP: #195258). Patch by Dan Drake + + -- Alexander Valavanis Mon, 08 Mar 2010 08:51:02 +0000 + rubber (1.1-2.2ubuntu1) lucid; urgency=low * debian/rules: Allow distclean errors to be handled properly diff -u rubber-1.1/src/rules/latex/__init__.py rubber-1.1/src/rules/latex/__init__.py --- rubber-1.1/src/rules/latex/__init__.py +++ rubber-1.1/src/rules/latex/__init__.py @@ -517,7 +517,7 @@ # the initial hooks: - self.comment_mark = "%" + self.comment_mark = re.compile("^\s*%") self.hooks = { "input" : self.h_input, @@ -681,7 +681,7 @@ # Lines that start with a comment are the ones where directives # may be found. - if line[0] == self.comment_mark: + if self.comment_mark.match(line): m = re_command.match(string.rstrip(line)) if m.group("cmd"): vars['line'] = lineno @@ -1076,11 +1076,11 @@ """ def end_verbatim (dict, self=self, hooks=self.hooks): self.hooks = hooks - self.comment_mark = "%" + self.comment_mark = re.compile("^\s*%") self.update_seq() self.hooks = { end : end_verbatim } self.update_seq() - self.comment_mark = None + self.comment_mark = re.compile("$ ") def h_endinput (self, dict): """