Simplify authors template

This commit is contained in:
Kovid Goyal 2014-09-22 20:07:47 +05:30
parent 8e3398d0c1
commit cc38a40fae

View File

@ -47,7 +47,7 @@ cprefs.defaults['footer_template'] = r'''program:
# Show at most two authors, on separate lines.
authors = field('authors');
num = count(authors, ' & ');
authors = cmp(num, 2, authors, authors, sublist(authors, 0, 2, ' & '));
authors = sublist(authors, 0, 2, ' & ');
authors = list_re(authors, ' & ', '(.+)', '<b>\1');
authors = re(authors, ' & ', '<br>');
re(authors, '&&', '&')