[Vim-latex-cvs] SF.net SVN: vim-latex: [1003] trunk/vimfiles/ftplugin/latex-suite
Brought to you by:
srinathava,
tmaas
From: <sri...@us...> - 2006-03-25 05:41:14
|
Revision: 1003 Author: srinathava Date: 2006-03-24 21:41:09 -0800 (Fri, 24 Mar 2006) ViewCVS: http://svn.sourceforge.net/vim-latex/?rev=1003&view=rev Log Message: ----------- Bug: Parsing bib files fails in certain situations, for example with fields like "number = 3," (a single number) Why: too many assumptions about how the bibtex file is structured. Fix: Relax the parsing. Modified Paths: -------------- trunk/vimfiles/ftplugin/latex-suite/bibtools.py trunk/vimfiles/ftplugin/latex-suite/version.vim Modified: trunk/vimfiles/ftplugin/latex-suite/bibtools.py =================================================================== --- trunk/vimfiles/ftplugin/latex-suite/bibtools.py 2006-03-23 04:02:21 UTC (rev 1002) +++ trunk/vimfiles/ftplugin/latex-suite/bibtools.py 2006-03-25 05:41:09 UTC (rev 1003) @@ -1,3 +1,7 @@ +# Author: Srinath Avadhanula +# This file is distributed as part of the vim-latex project +# http://vim-latex.sf.net + import re class Bibliography(dict): @@ -6,7 +10,6 @@ txt: a string which represents the entire bibtex entry. A typical entry is of the form: - @ARTICLE{ellington:84:part3, author = {Ellington, C P}, title = {The Aerodynamics of Hovering Insect Flight. III. Kinematics}, @@ -78,12 +81,11 @@ value = body[:(mn.start(0))] else: - mn = re.match(r'\d+', body) - if not mn: - raise "Only completely numeral fields can be left unquoted" + # $ always matches. So we do not need to do any + # error-checking. + mn = re.search(r',|$', body) + value = m.group(2) + body[:(mn.start(0))].rstrip() - value = m.group(2) + mn.group(0) - self[field] = re.sub(r'\s+', ' ', value) body = body[(mn.start(0)+1):] Modified: trunk/vimfiles/ftplugin/latex-suite/version.vim =================================================================== --- trunk/vimfiles/ftplugin/latex-suite/version.vim 2006-03-23 04:02:21 UTC (rev 1002) +++ trunk/vimfiles/ftplugin/latex-suite/version.vim 2006-03-25 05:41:09 UTC (rev 1003) @@ -24,7 +24,7 @@ " "stabilize" that version by releasing a few pre-releases and then " keep that as a stable point. function! Tex_Version() - return "Latex-Suite: version 1.8.11" + return "Latex-Suite: version 1.8.12" endfunction com! -nargs=0 TVersion echo Tex_Version() This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |