Fix bug #8164: lyxpak.py fails to include filenames with spaces

People love embedding spaces in filenames, so account for that.

(cherry picked from commit fbcf2486d8)
This commit is contained in:
Enrico Forestieri 2012-05-20 16:32:47 +02:00
parent d581412353
commit 5909fc467a
2 changed files with 12 additions and 9 deletions

View File

@ -23,15 +23,15 @@ from getopt import getopt
# Pre-compiled regular expressions.
re_lyxfile = re.compile("\.lyx$")
re_input = re.compile(r'^(.*)\\(input|include){(\s*)(\S+)(\s*)}.*$')
re_ertinput = re.compile(r'^(input|include)({)(\s*)(\S+)(\s*)}.*$')
re_package = re.compile(r'^(.*)\\(usepackage){(\s*)(\S+)(\s*)}.*$')
re_class = re.compile(r'^(\\)(textclass)(\s+)(\S+)$')
re_norecur = re.compile(r'^(.*)\\(verbatiminput|lstinputlisting|includegraphics\[*.*\]*){(\s*)(\S+)(\s*)}.*$')
re_ertnorecur = re.compile(r'^(verbatiminput|lstinputlisting|includegraphics\[*.*\]*)({)(\s*)(\S+)(\s*)}.*$')
re_filename = re.compile(r'^(\s*)(filename)(\s+)(\S+)$')
re_options = re.compile(r'^(\s*)options(\s+)(\S+)$')
re_bibfiles = re.compile(r'^(\s*)bibfiles(\s+)(\S+)$')
re_input = re.compile(r'^(.*)\\(input|include){(\s*)(.+)(\s*)}.*$')
re_ertinput = re.compile(r'^(input|include)({)(\s*)(.+)(\s*)}.*$')
re_package = re.compile(r'^(.*)\\(usepackage){(\s*)(.+)(\s*)}.*$')
re_class = re.compile(r'^(\\)(textclass)(\s+)(.+)\s*$')
re_norecur = re.compile(r'^(.*)\\(verbatiminput|lstinputlisting|includegraphics\[*.*\]*){(\s*)(.+)(\s*)}.*$')
re_ertnorecur = re.compile(r'^(verbatiminput|lstinputlisting|includegraphics\[*.*\]*)({)(\s*)(.+)(\s*)}.*$')
re_filename = re.compile(r'^(\s*)(filename)(\s+)(.+)\s*$')
re_options = re.compile(r'^(\s*)options(\s+)(.+)\s*$')
re_bibfiles = re.compile(r'^(\s*)bibfiles(\s+)(.+)\s*$')
def usage(prog_name):

View File

@ -118,6 +118,9 @@ What's new
- Fixed XHTML output of id's for bibitems (bug 8156).
- Fix generation of a lyx archive when included files have spaces embedded
in their names (bug 8164).
* USER INTERFACE