Skip to content

Commit

Permalink
delete unnecessary abstract, that contains only commas https://github…
Browse files Browse the repository at this point in the history
  • Loading branch information
socheres committed Dec 7, 2020
1 parent e482375 commit 48d048a
Showing 1 changed file with 4 additions and 84 deletions.
88 changes: 4 additions & 84 deletions SAGE Journals.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"inRepository": true,
"translatorType": 4,
"browserSupport": "gcsibv",
"lastUpdated": "2020-12-07 08:53:30"
"lastUpdated": "2020-12-07 10:29:32"
}

/*
Expand Down Expand Up @@ -174,6 +174,9 @@ function scrape(doc, url) {
if (reviewType && reviewType.match(/other/i) && item.issue === '5') {
item.tags.push('Book Review');
item.notes.push({note: "Booklist:" + item.date.match(/\d{4}$/)});
if (item.abstractNote && item.abstractNote.match(/,(?!\s\w)/g)) {
delete item.abstractNote;
}
}
}

Expand Down Expand Up @@ -701,89 +704,6 @@ var testCases = [
"seeAlso": []
}
]
},
{
"type": "web",
"url": "https://journals.sagepub.com/doi/full/10.1177/0142064X20928711",
"items": [
{
"itemType": "journalArticle",
"title": "1. New Testament General",
"creators": [],
"date": "August 1, 2020",
"DOI": "10.1177/0142064X20928711",
"ISSN": "0142-064X",
"abstractNote": ", , ,",
"issue": "5",
"journalAbbreviation": "Journal for the Study of the New Testament",
"language": "en",
"libraryCatalog": "SAGE Journals",
"pages": "1-3",
"publicationTitle": "Journal for the Study of the New Testament",
"url": "https://doi.org/10.1177/0142064X20928711",
"volume": "42",
"attachments": [
{
"title": "SAGE PDF Full Text",
"mimeType": "application/pdf"
}
],
"tags": [
{
"tag": "Book Review"
}
],
"notes": [
{
"note": "<p>doi: 10.1177/0142064X20928711</p>"
}
],
"seeAlso": []
}
]
},
{
"type": "web",
"url": "https://journals.sagepub.com/doi/full/10.1177/0142064X20928711",
"items": [
{
"itemType": "journalArticle",
"title": "1. New Testament General",
"creators": [],
"date": "August 1, 2020",
"DOI": "10.1177/0142064X20928711",
"ISSN": "0142-064X",
"abstractNote": ", , ,",
"issue": "5",
"journalAbbreviation": "Journal for the Study of the New Testament",
"language": "en",
"libraryCatalog": "SAGE Journals",
"pages": "1-3",
"publicationTitle": "Journal for the Study of the New Testament",
"url": "https://doi.org/10.1177/0142064X20928711",
"volume": "42",
"attachments": [
{
"title": "SAGE PDF Full Text",
"mimeType": "application/pdf"
}
],
"tags": [
{
"tag": "Book Review"
}
],
"notes": [
{
"note": "<p>doi: 10.1177/0142064X20928711</p>"
},
{
"note": "Booklist:2020"
}
],
"seeAlso": []
}
]
}
]
/** END TEST CASES **/

0 comments on commit 48d048a

Please sign in to comment.