diff options
author | John Ankarström <john@ankarstrom.se> | 2021-07-20 20:35:55 +0200 |
---|---|---|
committer | John Ankarström <john@ankarstrom.se> | 2021-07-21 11:19:55 +0200 |
commit | 342f5d25722f45c35ce52bfbb69ea25c5234ee58 (patch) | |
tree | ee960b4c2763c53221d019a5ccdc4dfc419eaa8c | |
parent | c878e4340f70f3ccafea25a9735aca259207d38b (diff) | |
download | fref-342f5d25722f45c35ce52bfbb69ea25c5234ee58.tar.gz |
Remove double period after author
-rw-r--r-- | fref.lex | 14 |
1 files changed, 9 insertions, 5 deletions
@@ -166,14 +166,18 @@ harvard() /* Print authors. */ for(i = 0; i < e.a-2; i++) - printf("%s, ", e.au[i]); + pf("*, ", e.au[i]); if(i == e.a-2) - printf("%s %s ", e.au[i++], t->and); + pf("* * ", e.au[i++], t->and); if(i == e.a-1) - printf("%s", e.au[i]); + pf("*", e.au[i]); /* Print date. */ - (pf(" (%).\n", e.da) || (e.a ? pf(".\n") : 0)); + if(!pf(" (%).\n", e.da) && e.a){ + if(e.au[i][strlen(e.au[i])-1] != '.') + pf("."); + pf("\n"); + } /* Print title, book/journal. */ if(*e.bo || *e.jo){ @@ -188,7 +192,7 @@ harvard() /* Print pages, converting hyphens to en dashes. */ if(*e.pp){ - printf(", %s", strpbrk(e.pp, ",-") ? t->pp : t->p); + pf(", *", strpbrk(e.pp, ",-") ? t->pp : t->p); for(i = 0; i < strlen(e.pp); i++){ if(e.pp[i] == '-') putchar('\\'); putchar(e.pp[i]); |