aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGertjan van den Burg <gertjanvandenburg@gmail.com>2020-05-24 21:34:42 +0100
committerGertjan van den Burg <gertjanvandenburg@gmail.com>2020-05-24 21:34:42 +0100
commitfd79254d38d0f96f4eab219eb536a37f79d6c948 (patch)
tree1d467fc4eab0ff5f1c5ec9d5e2002c565468bf14
parentMerge branch 'bugfix/pdfreader_error' (diff)
parentMerge branch 'master' into bugfix/arxiv_stamp (diff)
downloadpaper2remarkable-fd79254d38d0f96f4eab219eb536a37f79d6c948.tar.gz
paper2remarkable-fd79254d38d0f96f4eab219eb536a37f79d6c948.zip
Merge branch 'bugfix/arxiv_stamp'
-rw-r--r--paper2remarkable/providers/arxiv.py12
1 files changed, 11 insertions, 1 deletions
diff --git a/paper2remarkable/providers/arxiv.py b/paper2remarkable/providers/arxiv.py
index 4d0bc19..0385f94 100644
--- a/paper2remarkable/providers/arxiv.py
+++ b/paper2remarkable/providers/arxiv.py
@@ -107,7 +107,7 @@ class Arxiv(Provider):
block, n_subs1 = re.subn(
b"\(" + DEARXIV_TEXT_REGEX + b"\)Tj", b"()Tj", block,
)
- # remove the url
+ # remove the url (type 1)
block, n_subs2 = re.subn(
b"<<\n\/URI \("
+ DEARXIV_URI_REGEX
@@ -115,6 +115,16 @@ class Arxiv(Provider):
b"",
block,
)
+ # remove the url (type 2, i.e. Jackson arXiv 0309285v2)
+ block, n_subs3 = re.subn(
+ b"<<\n\/S \/URI\n" +
+ b"/URI \("
+ + DEARXIV_URI_REGEX
+ + b"\)\n>>\n",
+ b"",
+ block,
+ )
+
if n_subs1 or n_subs2:
# fix the length of the object stream
block = fix_stream_length(block)