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