X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;ds=sidebyside;f=lib%2Flyx2lyx%2Flyxconvert_217.py;h=b55bd7d0ae3d5cb45b6cae05e7b39f3e3b0c8d22;hb=cd6377fc2886e4be8e8f3a21fed6b23361dbea80;hp=b49135f361c4cf36659ec169949dcdaf609a012e;hpb=7c7f326f6406cb6eeed546204a642bbf372bf26b;p=lyx.git diff --git a/lib/lyx2lyx/lyxconvert_217.py b/lib/lyx2lyx/lyxconvert_217.py index b49135f361..b55bd7d0ae 100644 --- a/lib/lyx2lyx/lyxconvert_217.py +++ b/lib/lyx2lyx/lyxconvert_217.py @@ -27,7 +27,7 @@ def bool_table(item): align_table = {"0": "top", "2": "left", "4": "right", "8": "center"} use_table = {"0": "none", "1": "parbox"} -#table_meta_re = re.compile(r'') +table_meta_re = re.compile(r'') def update_tabular(lines): i=0 while 1: @@ -38,7 +38,10 @@ def update_tabular(lines): i = i +1 # scan table header meta-info - lines[i] = string.replace(lines[i], 'LyXTabular version="1"', 'lyxtabular version="2"') + res = table_meta_re.match( lines[i] ) + if res: + val = res.groups() + lines[i] = '' % val j = find_token(lines, '', i) + 1 if j == 0: @@ -49,10 +52,10 @@ def update_tabular(lines): lines[i:j] = new_table i = i + len(new_table) -col_re = re.compile(r'') -cell_re = re.compile(r'') -features_re = re.compile(r'') -row_re = re.compile(r'') +col_re = re.compile(r'') +cell_re = re.compile(r'') +features_re = re.compile(r'') +row_re = re.compile(r'') def table_update(lines): lines[1] = string.replace(lines[1], '