When normalizing tag names, collapse whitespace to 1 space.
This commit is contained in:
parent
51fa9aac46
commit
c9fcb51247
1 changed files with 2 additions and 0 deletions
|
@ -5,6 +5,7 @@ but are returned by the PDB accesses.
|
|||
import abc
|
||||
import os
|
||||
import PIL.Image
|
||||
import re
|
||||
import send2trash
|
||||
import traceback
|
||||
|
||||
|
@ -1275,6 +1276,7 @@ class Tag(ObjectBase, GroupableMixin):
|
|||
|
||||
name = name.lower()
|
||||
name = helpers.remove_control_characters(name)
|
||||
name = re.sub(r'\s+', ' ', name)
|
||||
name = name.strip(' .+')
|
||||
name = name.split('+')[0].split('.')[-1]
|
||||
name = name.replace('-', '_')
|
||||
|
|
Loading…
Reference in a new issue