code: def canonical_text(self, text):
          
          out = []
          line_continues_a_comment = False
          for line in text.splitlines():
              line,comment = self.comment_re.findall(line)[0]
              if line_continues_a_comment == True:
                  out[-1] = out[-1] + line.lstrip()
              else:
                  out.append(line)
              line_continues_a_comment = len(comment) > 0
          return '\n'.join(out).rstrip()+'\n'
docs: Standardize an input TeX-file contents.
  
          Currently:
            * removes comments, unwrapping comment-wrapped lines.