From 6b0e3e2093c8510eefaa5ebd1b583a9e278cceab Mon Sep 17 00:00:00 2001 From: Emiliano Heyns Date: Fri, 13 Jan 2023 14:52:53 +0100 Subject: [PATCH] fixes #2377 --- test/features/import.feature | 1 + ...t from Clipboard stopped working #2377.bib | 1 + ... from Clipboard stopped working #2377.json | 28 +++++++++++++++++++ util/testcase.py | 2 +- 4 files changed, 31 insertions(+), 1 deletion(-) create mode 100644 test/fixtures/import/Import from Clipboard stopped working #2377.bib create mode 100644 test/fixtures/import/Import from Clipboard stopped working #2377.json diff --git a/test/features/import.feature b/test/features/import.feature index c9e95560af..a50940ca41 100644 --- a/test/features/import.feature +++ b/test/features/import.feature @@ -64,6 +64,7 @@ Feature: Import Examples: | file | references | + | Import from Clipboard stopped working #2377 | 1 | | Child items that use the crossref field do not have their parent fields imported #2373 | 3 | | accessDate must be ISO date #2376 | 2 | | Dealing with base64-encoded paths from BibDesk #2374 | 3 | diff --git a/test/fixtures/import/Import from Clipboard stopped working #2377.bib b/test/fixtures/import/Import from Clipboard stopped working #2377.bib new file mode 100644 index 0000000000..41c0283e5a --- /dev/null +++ b/test/fixtures/import/Import from Clipboard stopped working #2377.bib @@ -0,0 +1 @@ +@techreport{TBD, title = {Report number 2PTE3 - 3D transport model under operative regime}, , number = {2PTE3}, institution = {{Research Institute X}}, url = {https://website.org/?uid=2PTE3}, Accessed = {2023-01-13}} \ No newline at end of file diff --git a/test/fixtures/import/Import from Clipboard stopped working #2377.json b/test/fixtures/import/Import from Clipboard stopped working #2377.json new file mode 100644 index 0000000000..787f597cfb --- /dev/null +++ b/test/fixtures/import/Import from Clipboard stopped working #2377.json @@ -0,0 +1,28 @@ +{ + "config": { + "id": "36a3b0b5-bad0-4a04-b79b-441c7cef77db", + "label": "BetterBibTeX JSON", + "options": { + "exportNotes": true + }, + "preferences": { + "citekeyFormat": "auth + year", + "citekeyFormatBackup": "auth + year" + } + }, + "items": [ + { + "citationKey": "TBD", + "extra": [ + "Citation Key: TBD", + "tex.accessed: 2023-01-13" + ], + "itemID": 1, + "itemType": "report", + "number": "2PTE3", + "publisher": "Research Institute X", + "title": "Report number 2PTE3 - 3D transport model under operative regime", + "url": "https://website.org/?uid=2PTE3" + } + ] +} diff --git a/util/testcase.py b/util/testcase.py index 435f99c51f..ee8d12938a 100755 --- a/util/testcase.py +++ b/util/testcase.py @@ -69,7 +69,7 @@ g = Github(os.environ['GITHUB_TOKEN']) repo = g.get_repo('retorquere/zotero-better-bibtex') issue = repo.get_issue(int(args.issue)) -args.title = re.sub(r'^\[[^\]]+\]', '', issue.title).strip() +args.title = re.sub(r'^\[[^\]]+\]\s*:', '', issue.title).strip() args.title = sanitize_filename(f'{args.title} #{issue.number}'.strip()) # clean lib before putting it in place