Opened 9 years ago
Last modified 9 years ago
#12025 closed enhancement
Image macro should support InterMapTxt — at Version 9
Reported by: | anonymous | Owned by: | Ryan J Ollos |
---|---|---|---|
Priority: | normal | Milestone: | 1.1.5 |
Component: | wiki system | Version: | |
Severity: | normal | Keywords: | interwiki imagemacro |
Cc: | Branch: | ||
Release Notes: |
|
||
API Changes: | |||
Internal Changes: |
Description
The image macro does not seem to support InterMapTxt prefixes. This would allow to easily extend the image macro with new capabilities e.g. for frequently linked badges, build status icons etc.)
Change History (9)
comment:1 by , 9 years ago
comment:2 by , 9 years ago
Keywords: | interwiki added; intermaptxt removed |
---|
comment:4 by , 9 years ago
comment:6 by , 9 years ago
-
trac/wiki/macros.py
diff -r aebe73fe2b02 trac/wiki/macros.py
a b 38 38 from trac.wiki.formatter import ( 39 39 format_to_html, format_to_oneliner, extract_link, OutlineFormatter 40 40 ) 41 from trac.wiki.interwiki import InterWikiMap 41 42 42 43 43 44 # TODO: should be moved in .api … … 632 633 attachment = Resource(realm, id).child('attachment', filename) 633 634 elif len(parts) == 2: 634 635 realm, filename = parts 636 interwikimap = InterWikiMap(self.env) 635 637 if realm in browser_links: # source:path 636 638 # TODO: use context here as well 637 639 rev = None … … 641 643 raw_url = formatter.href.browser(filename, rev=rev, 642 644 format='raw') 643 645 desc = filespec 646 elif realm in interwikimap: 647 url, desc = interwikimap.url(realm, filename) 648 raw_url = url 644 649 else: # #ticket:attachment or WikiPage:attachment 645 650 # FIXME: do something generic about shorthand forms... 646 651 realm = None
comment:7 by , 9 years ago
Milestone: | unscheduled → 1.1.5 |
---|---|
Owner: | set to |
Status: | new → assigned |
Tests and documentation update were also needed. Proposed changes in log:rjollos.git:t12025.
comment:8 by , 9 years ago
Keywords: | imagemacro added |
---|
comment:9 by , 9 years ago
Release Notes: | modified (diff) |
---|
Note:
See TracTickets
for help on using tickets.
As a workaround a custom plugin can be written: