From 7a3c40e2797c1dfdf75ebea6b9f98d8b3b367b3e Mon Sep 17 00:00:00 2001 From: Nick Mathewson Date: Mon, 2 Jul 2007 18:11:55 +0000 Subject: r13583@catbus: nickm | 2007-07-02 13:59:46 -0400 Enforce use of en-dash in pages field. svn:r226 --- BibTeX.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/BibTeX.py b/BibTeX.py index a7a030a..6e748a0 100644 --- a/BibTeX.py +++ b/BibTeX.py @@ -380,6 +380,9 @@ class BibTeXEntry: not self['booktitle'].startswith("{Proceedings of"): errs.append("ERROR: %s's booktitle doesn't start with 'Proceedings'" % self.key) + if self.has_key("pages") and not re.match(r'\d+--\d+', self['pages']): + errs.append("ERRROR: Misformed pages in %s"%self.key) + if self.type == 'proceedings': if self.get('title'): errs.append("ERROR: %s is a proceedings: it should have a booktitle, not a title." % self.key) -- cgit v1.2.3-70-g09d2