Project

General

Profile

« Previous | Next » 

Revision 6832

dict2redmine: redmine_add_links(): Fixed bug where need to avoid matching internal links ( ... ) as citations ( [...] )

View differences:

dict2redmine
55 55

  
56 56
def redmine_add_links(page_name, text):
57 57
    # Link citations to entry in sources list
58
    text = re.sub(r'\[(.*?)\]',
58
    text = re.sub(r'(?<!\[)\[([^\[\]]*)\](?!\])',
59 59
        redmine_bold(redmine_url('\g<0>', page_name+r'#\1')), text)
60 60
    return text
61 61

  

Also available in: Unified diff