Skip to content

Commit

Permalink
Fix #1672 newline in arxiv title
Browse files Browse the repository at this point in the history
If a newline was present in an arxiv title, then quickstatement would not accept
it. This removes the newline from the scraped content.
  • Loading branch information
fnielsen committed Nov 19, 2021
1 parent 37d90f0 commit 0f891e9
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion scholia/arxiv.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,11 @@ def get_metadata(arxiv):
'authornames': [author.name for author in entry.authors],
'full_text_url': 'https://arxiv.org/pdf/' + arxiv + '.pdf',
'publication_date': entry.published[:10],
'title': entry.title,

# Some titles may have a newline in them. This should be converted to
# an ordinary space character
'title': re.sub(r'\s+', ' ', entry.title),

'arxiv_classifications': [tag.term for tag in entry.tags],
}

Expand Down

0 comments on commit 0f891e9

Please sign in to comment.