aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2007-07-02 18:11:55 +0000
committerNick Mathewson <nickm@torproject.org>2007-07-02 18:11:55 +0000
commit7a3c40e2797c1dfdf75ebea6b9f98d8b3b367b3e (patch)
tree6dcee23a4f0f47ebc7e053ec7a15a61c03230884
parent1673d2b2948143cd8f0eb85a2dfec192015052be (diff)
downloadanonbib-7a3c40e2797c1dfdf75ebea6b9f98d8b3b367b3e.tar.gz
r13583@catbus: nickm | 2007-07-02 13:59:46 -0400
Enforce use of en-dash in pages field. svn:r226
-rw-r--r--BibTeX.py3
1 files changed, 3 insertions, 0 deletions
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)