Changeset 685

Show
Ignore:
Timestamp:
04/21/06 07:34:25 (3 years ago)
Author:
athomas
Message:

AcronymsPlugin:

Fix for acronyms without IDs (eg. URIs).

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • acronymsplugin/0.9/tracacronyms/acronyms.py

    r684 r685  
    4646        # Perform basic variable subsitution 
    4747        title = title.replace('$1', selector).strip() 
     48        suffix = '' 
    4849        if selector: 
    4950            if shref: 
    5051                href = shref.replace('$1', selector) 
    51             acronym += ' ' + match.group('acronymselector') 
     52                acronym += ' ' + match.group('acronymselector') 
     53            else: 
     54                suffix = match.group('acronymselector') 
     55                 
    5256 
    5357        if href: 
    54             return Markup('<a class="acronym" href="%s"><acronym title="%s">%s</acronym></a>'  
    55                           % (href, title, acronym)) 
     58            return Markup('<a class="acronym" href="%s"><acronym title="%s">%s</acronym></a>%s' 
     59                          % (href, title, acronym, suffix)) 
    5660        else: 
    57             return Markup('<acronym title="%s">%s</acronym>' % (title, acronym)) 
     61            return Markup('<acronym title="%s">%s</acronym>%s' % (title, acronym, suffix)) 
    5862 
    5963    # IWikiSyntaxProvider methods