mirror of
https://github.com/omnivore-app/omnivore.git
synced 2026-03-11 08:54:26 +00:00
Remove \n, extra spaces from and trim author
This commit is contained in:
parent
deda0f8b7b
commit
f77aae9810
2 changed files with 3 additions and 2 deletions
|
|
@ -3022,7 +3022,8 @@ Readability.prototype = {
|
|||
var textContent = articleContent.textContent;
|
||||
return {
|
||||
title: this._articleTitle,
|
||||
byline: author,
|
||||
// remove \n and extra spaces and trim the string
|
||||
byline: author ? author.replace(/\n/g, ' ').replace(/\s+/g, ' ').trim() : null,
|
||||
dir: this._articleDir,
|
||||
content: this._serializer(articleContent),
|
||||
textContent: textContent,
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"title": "Novavax, eyeing the COVID 'vaccine hesitant' and kids, unveils new education campaigns as Nuvaxovid nears US finish line",
|
||||
"byline": " 03:23pm",
|
||||
"byline": "03:23pm",
|
||||
"dir": null,
|
||||
"excerpt": "Pfizer, Moderna and Johnson & Johnson were quickest off the mark in getting COVID vaccines into American arms, but Novavax is hoping to add another pandemic vaccine to the U.S. | Pfizer, Moderna and Johnson & Johnson were quickest off the mark in getting COVID vaccines into American arms, but Novavax is hoping to add another pandemic vaccine to the U.S. mix soon—and it's pushing new campaigns to get the word out.",
|
||||
"siteName": "Fierce Pharma",
|
||||
|
|
|
|||
Loading…
Reference in a new issue