diff options
| author | Gertjan van den Burg <gertjanvandenburg@gmail.com> | 2020-05-24 21:28:23 +0100 |
|---|---|---|
| committer | Gertjan van den Burg <gertjanvandenburg@gmail.com> | 2020-05-24 21:28:23 +0100 |
| commit | 8252be3737fbc5e5cfd8cb8084a571fa0435800b (patch) | |
| tree | 1d467fc4eab0ff5f1c5ec9d5e2002c565468bf14 | |
| parent | Merge branch 'master' into bugfix/pdfreader_error (diff) | |
| download | paper2remarkable-8252be3737fbc5e5cfd8cb8084a571fa0435800b.tar.gz paper2remarkable-8252be3737fbc5e5cfd8cb8084a571fa0435800b.zip | |
Correctly remove alternative arXiv stamp
| -rw-r--r-- | paper2remarkable/providers/arxiv.py | 12 |
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) |
