diff --git a/chatmastermind/storage.py b/chatmastermind/storage.py index aa6288c..ac59eb5 100644 --- a/chatmastermind/storage.py +++ b/chatmastermind/storage.py @@ -7,7 +7,7 @@ from typing import List, Dict, Any, Optional def read_file(fname: pathlib.Path, tags_only: bool = False) -> Dict[str, Any]: with open(fname, "r") as fd: - tagline = fd.readline().strip().split(':')[1].strip() + tagline = fd.readline().strip().split(':', maxsplit=1)[1].strip() # also support tags separated by ',' (old format) separator = ',' if ',' in tagline else ' ' tags = [t.strip() for t in tagline.split(separator)]