check _TAGS:NAME from content in header. Now fix
This commit is contained in:
parent
418254a45f
commit
1bb3df0d26
|
@ -526,20 +526,25 @@ def check_content(post_bottom):
|
|||
post_err = True
|
||||
|
||||
|
||||
# Check for _image:NAME from content in header
|
||||
#---------------------------------------------
|
||||
# Check for all match _TAGS:NAME from content in header
|
||||
#------------------------------------------------------
|
||||
print(article_header)
|
||||
for ln, line in enumerate(post_bottom):
|
||||
for tag in tyto.content_tags:
|
||||
htag_found = False
|
||||
if line.startswith(tag):
|
||||
tag_id = line.rsplit(':', 1)[1].rsplit(' ')[0]
|
||||
htag = tag[1: len(tag)]
|
||||
|
||||
rexp = r'|%s\s+\b%s\b|%s\b%s\b'%(
|
||||
htag, tag_id, htag, tag_id
|
||||
)
|
||||
if not re.search(rexp, article_header):
|
||||
if line.startswith(tag):
|
||||
tag_id = line.rsplit(':', 1)[1].rsplit(' ')[0]
|
||||
|
||||
match = False
|
||||
for hline in post_header:
|
||||
if hline.startswith('image:'):
|
||||
htag_id = hline.rsplit(':', 1)[1].lstrip()
|
||||
if htag_id == tag_id:
|
||||
match = True
|
||||
break
|
||||
|
||||
if not match:
|
||||
tyto.exiting("10", "%s %s"%(htag, tag_id), True)
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue