Convert \color default -> \color inherit -- lyx2lyx

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@8868 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
José Matox 2004-08-04 15:45:26 +00:00
parent 2e6ef4e5d5
commit 539c829bb1
2 changed files with 20 additions and 1 deletions

View File

@ -1,3 +1,8 @@
2004-08-05 José Matos <jamatos@lyx.org>
* lyx_1.4.py (remove_color_default): move
\color default -> \color inherit
2004-08-05 José Matos <jamatos@lyx.org>
* parser_tools.py (read_file): remove \r from line's end when present.

View File

@ -26,6 +26,19 @@ from parser_tools import find_token, find_end_of_inset, get_next_paragraph, \
from sys import stdin
from string import replace, split, find, strip, join
##
# Remove \color default
#
def remove_color_default(lines):
i = 0
while 1:
i = find_token(lines, "\\color default", i)
if i == -1:
return
lines[i] = replace(lines[i], "\\color default",
"\\color inherit")
##
# Add \end_header
#
@ -1352,7 +1365,8 @@ def revert_paperpackage(header, opt):
def convert(header, body, opt):
if opt.format < 223:
insert_tracking_changes(header)
add_end_header(header)
add_end_header(header)
remove_color_default(body)
convert_spaces(body)
convert_bibtex(body)
remove_insetparent(body)