detect images
This commit is contained in:
parent
523ec9c937
commit
fa96dfd36d
@ -34,6 +34,10 @@ def line2words(lines, limit):
|
||||
output.append("...")
|
||||
return output
|
||||
|
||||
def _is_image_token(token: str, extensions):
|
||||
parts = token.rsplit('.', 1)
|
||||
return len(parts) == 2 and parts[1] in extensions
|
||||
|
||||
# this is similar to the markup function in microblog
|
||||
def enrich_msg(lines, is_atom=True):
|
||||
if not is_atom:
|
||||
|
Loading…
x
Reference in New Issue
Block a user