From 281de48ed4b0bc67d48e7a8ec1f85e4dbdeaa247 Mon Sep 17 00:00:00 2001 From: mikiher Date: Thu, 30 Nov 2023 21:49:24 +0200 Subject: [PATCH] Fix "et al" cleanup --- server/finders/BookFinder.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/finders/BookFinder.js b/server/finders/BookFinder.js index 4422fa98..b76b8b1d 100644 --- a/server/finders/BookFinder.js +++ b/server/finders/BookFinder.js @@ -463,7 +463,7 @@ function cleanAuthorForCompares(author) { // remove middle initials cleanAuthor = cleanAuthor.replace(/(?<=\w\w)(\s+[a-z]\.?)+(?=\s+\w\w)/g, '') // remove et al. - cleanAuthor = cleanAuthor.replace(/et al\.?/g, '') + cleanAuthor = cleanAuthor.replace(/ et al\.?(?= |$)/g, '') return cleanAuthor }