+2004-08-05 José Matos <jamatos@lyx.org>
+
+ * parser_tools.py (read_file): remove \r from line's end when present.
+
2004-07-01 Georg Baum <Georg.Baum@post.rwth-aachen.de>
* lyx_1_4.py (convert_paperpackage): new, convert paperpackage setting
2004-05-11 José Matos <jamatos@lyx.org>
-
* parser_tools.py (get_backend): get the document backend.
* lyx2lyx (main): new member of the document structure,
the textclass and backend, that default to article and latex.
opt.error("Invalid LyX file.")
line = line[:-1]
+ # remove '\r' from line's end, if present
+ if line[-1:] == '\r':
+ line = line[:-1]
+
if check_token(line, '\\begin_preamble'):
preamble = 1
if check_token(line, '\\end_preamble'):
line = opt.input.readline()
if not line:
break
- body.append(line[:-1])
+ # remove '\r' from line's end, if present
+ if line[-2:-1] == '\r':
+ body.append(line[:-2])
+ else:
+ body.append(line[:-1])
def write_file(header, body, opt):