From 0332b85e7b326d35a8853f467b6c8a1fcb77cad4 Mon Sep 17 00:00:00 2001 From: Holger Schurig Date: Fri, 26 Jun 2009 12:11:41 +0200 Subject: [PATCH] link: use URL if no text has been specified --- plugins/link.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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) -- 2.39.2