File tree Expand file tree Collapse file tree 1 file changed +8
-3
lines changed
Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -202,13 +202,18 @@ def check_if_preorder(self, book_date):
202202 def name_to_initials (self , input_name ):
203203 """
204204 Converts a name to initials.
205+ Shorten input_name by splitting on whitespaces
206+ Only the surname stays as whole, the rest gets truncated
207+ and merged with dots.
205208 Example: 'Arthur Conan Doyle' -> 'A.C.Doyle'
206209 Example: 'J K Rowling' -> 'J.K.Rowling'
207210 Example: 'J. R. R. Tolkien' -> 'J.R.R.Tolkien'
208211 """
209- # Shorten input_name by splitting on whitespaces
210- # Only the surname stays as whole, the rest gets truncated
211- # and merged with dots.
212+
213+ # Remove quotation marks
214+ input_name = input_name .replace ('"' , '' )
215+
216+ # Split name into parts
212217 name_parts = self .clear_contributor_text (input_name ).split ()
213218
214219 # Check if prename and surname exist, otherwise exit
You can’t perform that action at this time.
0 commit comments