small improvement to abbreviation generation
This commit is contained in:
parent
100edc3131
commit
cdbdf4ede1
1 changed files with 2 additions and 1 deletions
|
@ -203,8 +203,9 @@ class HTMLOutput:
|
|||
|
||||
def abbrev(name):
|
||||
abbrev = name[0]
|
||||
word_seperators = [" ", "_", "+", "(", ")"]
|
||||
for i in range(1, len(name)):
|
||||
if name[i] in ["(", ")"] or name[i - 1] in [" ", "_", "(", ")"]:
|
||||
if name[i] in ["+", "(", ")"] or name[i - 1] in word_seperators and name[i] not in word_seperators:
|
||||
abbrev += name[i]
|
||||
return abbrev
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue