Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
ouput = "%s---\n" % output
if self.link and self.link in self.links:
output = "%s%s\n" % (output, self.links[self.link].markdownify(summary=True))
urls = utils.extract_urls(initial_message)
for u in urls:
if not u==self.link and u in self.links:
output = "%s%s\n" % (output, self.links[u].markdownify(summary=True))
output = "%s\n" % output
for c in self.comments:
output = "%s**%s:**\n%s\n\n" % (output, c.user.name, mdl(c.message))
self.save_markdown(output, save_location=save_location)
#
users_str = ' - '.join([self.users[k].name for k in self.users])
if not save_location:
title = initial_message if initial_message else self.link if hasattr(self, 'link') and self.link else 'no title available'
title = utils.truncate(re.sub('[\r\n]', ' / ', title), 180)
files.save_txt(title, subdir=self.id, filename="title.txt")
def extract_links(self, s, description_override=None):
urls = utils.extract_urls(s)
description = s if not description_override else description_override
for u in urls:
if not u in self.links:
self.links[u] = Link(u, description=description)