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
|
post_err = True
|
||||||
|
|
||||||
|
|
||||||
# Check for _image:NAME from content in header
|
# Check for all match _TAGS:NAME from content in header
|
||||||
#---------------------------------------------
|
#------------------------------------------------------
|
||||||
print(article_header)
|
print(article_header)
|
||||||
for ln, line in enumerate(post_bottom):
|
for ln, line in enumerate(post_bottom):
|
||||||
for tag in tyto.content_tags:
|
for tag in tyto.content_tags:
|
||||||
htag_found = False
|
htag = tag[1: len(tag)]
|
||||||
|
|
||||||
if line.startswith(tag):
|
if line.startswith(tag):
|
||||||
tag_id = line.rsplit(':', 1)[1].rsplit(' ')[0]
|
tag_id = line.rsplit(':', 1)[1].rsplit(' ')[0]
|
||||||
htag = tag[1: len(tag)]
|
|
||||||
|
|
||||||
rexp = r'|%s\s+\b%s\b|%s\b%s\b'%(
|
match = False
|
||||||
htag, tag_id, htag, tag_id
|
for hline in post_header:
|
||||||
)
|
if hline.startswith('image:'):
|
||||||
if not re.search(rexp, article_header):
|
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)
|
tyto.exiting("10", "%s %s"%(htag, tag_id), True)
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue