Project

General

Profile

« Previous | Next » 

Revision 6686

dict2redmine: redmine_url(): Support internal links

View differences:

dict2redmine
41 41
def redmine_bold(text): return '*'+text+'*'
42 42

  
43 43
def redmine_url(text, url):
44
    if url: return '"'+text+'":'+url
45
    else: return text
44
    if not url: return text
45
    elif url.find('://') >= 0: return '"'+text+'":'+url # external link
46
    else: return '[['+url+'|'+text+']]' # internal link
46 47

  
47 48
def source2redmine_url(url):
48 49
    if url: return redmine_url(url_term(url), simplify_url(url))

Also available in: Unified diff