syntax_fix

This commit is contained in:
ahmed531998 2023-04-15 19:11:30 +02:00
parent 83b4d3eeb1
commit 6005acace4
1 changed files with 5 additions and 1 deletions

6
VRE.py
View File

@ -278,6 +278,10 @@ class VRE:
if not paper_df.empty or not dataset_df.empty or not content_df.empty or not post_df.empty:
self.new_income = True
def remove_suffix(self, input_string, suffix):
if suffix and input_string.endswith(suffix):
return input_string[:-len(suffix)]
return input_string
def remove_useless_dots(self, line):
modline = ''
@ -339,7 +343,7 @@ class VRE:
if j+1 < len(splits):
splits[j] = splits[j]+'. '
if j == len(splits)-1:
splits[j] = splits[j].removesuffix('-')
splits[j] = self.remove_suffix(splits[j], '-') #splits[j].removesuffix('-')
return splits, i+1
else:
return [], i+1