From: Holger Schurig Date: Fri, 26 Jun 2009 10:11:41 +0000 (+0200) Subject: link: use URL if no text has been specified X-Git-Url: https://oss.titaniummirror.com/gitweb?p=webber.git;a=commitdiff_plain;h=0332b85e7b326d35a8853f467b6c8a1fcb77cad4 link: use URL if no text has been specified --- diff --git a/plugins/link.py b/plugins/link.py index 5190061..d8c4214 100644 --- a/plugins/link.py +++ b/plugins/link.py @@ -26,7 +26,6 @@ def do_link(m): link = m.group(2).replace("\n", " ") anchor = m.group(3) or "" if link.find(".") == -1: - #link = link.tolower() for f in files: file = files[f] if not file.has_key("linktitle"): @@ -40,6 +39,8 @@ def do_link(m): link = get_link_from(get_current_file().linktitle, file.linktitle) #print "LINK: '%s' '%s'" % (text, link) break + if not text: + text = link # TODO: validate link return '%s' % (link, anchor, text)