Fix regex at check to search some specific characters in NAME
This commit is contained in:
parent
ba9961e357
commit
e6e02ea30e
|
@ -531,7 +531,7 @@ def check_3lines(tag, ln, line):
|
||||||
check_snpic(name)
|
check_snpic(name)
|
||||||
return
|
return
|
||||||
|
|
||||||
elif not isin(r'\b%s\b'%(opt_tags_post_name[tag]%name), post_bottom):
|
elif not isin("%s"%(opt_tags_post_name[tag]%name), post_bottom):
|
||||||
logs.out("12", '"%s" > %s'%(
|
logs.out("12", '"%s" > %s'%(
|
||||||
opt_tags_post_name[tag]%name, db.uri_file
|
opt_tags_post_name[tag]%name, db.uri_file
|
||||||
), False)
|
), False)
|
||||||
|
@ -587,10 +587,11 @@ def check_3lines(tag, ln, line):
|
||||||
# Find in post_bottom #
|
# Find in post_bottom #
|
||||||
#---------------------#
|
#---------------------#
|
||||||
def isin(term, post_file):
|
def isin(term, post_file):
|
||||||
for line in post_file.rsplit('\n'):
|
paterm = re.escape(term)
|
||||||
if re.search(term, line):
|
|
||||||
return(True)
|
if re.search(paterm, post_file): return(True)
|
||||||
return(False)
|
else: return(False)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#===================================#
|
#===================================#
|
||||||
|
|
Loading…
Reference in New Issue