detect images

This commit is contained in:
Eloi Torrents 2025-09-05 09:35:59 +02:00
parent 523ec9c937
commit fa96dfd36d

View File

@ -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: