X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;ds=sidebyside;f=diff2html.py;h=d573d8fe8264e1abd59be97809bc89f9705ef0d9;hb=cae8dca768d5fc7aeb960322130fe95121000bb4;hp=5704270b6e7c06a35bb4bdee0b2137c4ba9f2572;hpb=c9d556f8b4e547753a77cfe5cf60cf32408aa42a;p=diff2html.git diff --git a/diff2html.py b/diff2html.py index 5704270..d573d8f 100644 --- a/diff2html.py +++ b/diff2html.py @@ -20,6 +20,7 @@ # # Authors: Olivier MATZ # Alan De Smet +# Sergey Satskiy # # Inspired by diff2html.rb from Dave Burt # (mainly for html theme) @@ -308,10 +309,12 @@ def parse_input(input_file, output_file, if m: empty_buffer(output_file) file1 = m.groups()[0] - l = input_file.readline() - m = re.match('^\+\+\+ ([^\s]*)', l) - if m: - file2 = m.groups()[0] + while True: + l = input_file.readline() + m = re.match('^\+\+\+ ([^\s]*)', l) + if m: + file2 = m.groups()[0] + break add_filename(file1, file2, output_file) hunk_off1, hunk_size1, hunk_off2, hunk_size2 = 0, 0, 0, 0 continue @@ -395,7 +398,6 @@ def main(): print str(err) # will print something like "option -a not recognized" usage() sys.exit(2) - output = None verbose = False for o, a in opts: if o in ("-h", "--help"):