Skip to content

Commit

Permalink
Avoid blank parts in BibTeX key (#1243)
Browse files Browse the repository at this point in the history
* Avoid blank parts in BibTeX key

Fixes #771.
* Change anonymous to noauthor
  • Loading branch information
zuphilip authored and adam3smith committed Mar 11, 2017
1 parent 1d4862a commit 70d6190
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions BibTeX.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"inRepository": true,
"translatorType": 3,
"browserSupport": "gcsv",
"lastUpdated": "2017-01-25 13:39:28"
"lastUpdated": "2017-03-11 13:39:28"
}

function detectImport() {
Expand Down Expand Up @@ -1089,13 +1089,13 @@ var citeKeyConversions = {
if(item.creators && item.creators[0] && item.creators[0].lastName) {
return item.creators[0].lastName.toLowerCase().replace(/ /g,"_").replace(/,/g,"");
}
return "";
return "noauthor";
},
"t":function (flags, item) {
if (item["title"]) {
return item["title"].toLowerCase().replace(citeKeyTitleBannedRe, "").split(/\s+/g)[0];
}
return "";
return "notitle";
},
"y":function (flags, item) {
if(item.date) {
Expand All @@ -1104,7 +1104,7 @@ var citeKeyConversions = {
return date.year;
}
}
return "????";
return "nodate";
}
}

Expand Down Expand Up @@ -3513,4 +3513,4 @@ var testCases = [
]
}
]
/** END TEST CASES **/
/** END TEST CASES **/

0 comments on commit 70d6190

Please sign in to comment.