diff --git a/etherpump/commands/pull.py b/etherpump/commands/pull.py index dcb49f0..869d5f4 100644 --- a/etherpump/commands/pull.py +++ b/etherpump/commands/pull.py @@ -377,22 +377,15 @@ async def handle_pad(args, padid, data, info, session): # once the content is settled, compute a hash # and link it in the metadata! - # include magic words + ########################################## + # INCLUDE __XXX__ MAGIC WORDS + ########################################## if args.magicwords: - - ########################################## - ## INCLUDE __XXX__ MAGIC WORDS - ########################################## pattern = r"__[a-zA-Z0-9]+?__" - magic_words = re.findall(pattern, text) - magic_words = list(set(magic_words)) + all_matches = re.findall(pattern, text) + magic_words = list(set(all_matches)) if magic_words: meta["magicwords"] = magic_words - print( - "FOUND MAGIC WORD(s): {} in {}".format( - magic_words, padid - ) - ) links = [] if args.css: