mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-22 13:18:28 +00:00
Fix lyx2lyx warning for tex2lyx files
I would not have thought that reLyX was considered, but not tex2lyx!
This commit is contained in:
parent
9e5ecdcdce
commit
ced24dea55
@ -64,6 +64,7 @@ def minor_versions(major, last_minor_version):
|
|||||||
format_re = re.compile(r"(\d)[\.,]?(\d\d)")
|
format_re = re.compile(r"(\d)[\.,]?(\d\d)")
|
||||||
fileformat = re.compile(r"\\lyxformat\s*(\S*)")
|
fileformat = re.compile(r"\\lyxformat\s*(\S*)")
|
||||||
original_version = re.compile(r".*?LyX ([\d.]*)")
|
original_version = re.compile(r".*?LyX ([\d.]*)")
|
||||||
|
original_tex2lyx_version = re.compile(r".*?tex2lyx ([\d.]*)")
|
||||||
|
|
||||||
##
|
##
|
||||||
# file format information:
|
# file format information:
|
||||||
@ -413,12 +414,16 @@ class LyX_base:
|
|||||||
return None
|
return None
|
||||||
|
|
||||||
line = line.replace("fix",".")
|
line = line.replace("fix",".")
|
||||||
result = original_version.match(line)
|
# need to test original_tex2lyx_version first because tex2lyx
|
||||||
|
# writes "#LyX file created by tex2lyx 2.2"
|
||||||
|
result = original_tex2lyx_version.match(line)
|
||||||
|
if not result:
|
||||||
|
result = original_version.match(line)
|
||||||
|
if result:
|
||||||
|
# Special know cases: reLyX and KLyX
|
||||||
|
if line.find("reLyX") != -1 or line.find("KLyX") != -1:
|
||||||
|
return "0.12"
|
||||||
if result:
|
if result:
|
||||||
# Special know cases: reLyX and KLyX
|
|
||||||
if line.find("reLyX") != -1 or line.find("KLyX") != -1:
|
|
||||||
return "0.12"
|
|
||||||
|
|
||||||
res = result.group(1)
|
res = result.group(1)
|
||||||
if not res:
|
if not res:
|
||||||
self.warning(line)
|
self.warning(line)
|
||||||
|
Loading…
Reference in New Issue
Block a user