Commits

Christian Boos committed 5a69e5f

`[[Image]]` macro is also producing inline content.

Comments (0)

Files changed (2)

trac/wiki/macros.py

     <gotoh@taiyo.co.jp>''
     """)
 
+    def is_inline(self, content):
+        return True
+
     def expand_macro(self, formatter, name, content):
         # args will be null if the macro is called without parenthesis.
         if not content:

trac/wiki/tests/macros.py

 <a style="padding:0; border:none" href="/browser/test.png"><img src="/browser/test.png?format=raw" alt="source:test.png" title="source:test.png" /></a>
 </p>
 ------------------------------
-[[Image(...)]]
+<a style="padding:0; border:none" href="/browser/test.png"><img src="/browser/test.png?format=raw" alt="source:test.png" title="source:test.png" /></a>
 ============================== intertrac:source: Image, no other arguments
 [[Image(trac:source:/trunk/doc/images/bkgnd_pattern.png)]]
 ------------------------------
 <a style="padding:0; border:none" href="http://trac.edgewall.org/intertrac/source%3A/trunk/doc/images/bkgnd_pattern.png"><img src="http://trac.edgewall.org/intertrac/source%3A/trunk/doc/images/bkgnd_pattern.png%3Fformat%3Draw" alt="source:/trunk/doc/images/bkgnd_pattern.png in Trac's Trac" title="source:/trunk/doc/images/bkgnd_pattern.png in Trac's Trac" /></a>
 </p>
 ------------------------------
-[[Image(...)]]
+<a style="padding:0; border:none" href="http://trac.edgewall.org/intertrac/source%3A/trunk/doc/images/bkgnd_pattern.png"><img src="http://trac.edgewall.org/intertrac/source%3A/trunk/doc/images/bkgnd_pattern.png%3Fformat%3Draw" alt="source:/trunk/doc/images/bkgnd_pattern.png in Trac's Trac" title="source:/trunk/doc/images/bkgnd_pattern.png in Trac's Trac" /></a>
 ============================== source: Image, nolink
 [[Image(source:test.png, nolink)]]
 ------------------------------
 <img src="/browser/test.png?format=raw" alt="source:test.png" title="source:test.png" />
 </p>
 ------------------------------
+<img src="/browser/test.png?format=raw" alt="source:test.png" title="source:test.png" />
 ============================== source: Image, normal args
 [[Image(source:test.png, align=left, title=Test)]]
 ------------------------------
 <a style="padding:0; border:none" href="/browser/test.png"><img src="/browser/test.png?format=raw" alt="source:test.png" style="float:left" title="Test" /></a>
 </p>
 ------------------------------
+<a style="padding:0; border:none" href="/browser/test.png"><img src="/browser/test.png?format=raw" alt="source:test.png" style="float:left" title="Test" /></a>
 ============================== source: Image, size arg
 [[Image(source:test.png, 30%)]]
 ------------------------------
 <a style="padding:0; border:none" href="/wiki/WikiStart"><img src="/browser/test.png?format=raw" alt="/browser/test.png?format=raw" title="/browser/test.png?format=raw" /></a>
 </p>
 ------------------------------
+<a style="padding:0; border:none" href="/wiki/WikiStart"><img src="/browser/test.png?format=raw" alt="/browser/test.png?format=raw" title="/browser/test.png?format=raw" /></a>
 """