avinash-k / gwtwiki

Automatically exported from code.google.com/p/gwtwiki
0 stars 0 forks source link

improve rendering of image format #103

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
== Pakistan ==
'''Pakistan''' ({{IPAc-en|En-us-Pakistan.ogg|ˈ|p|æ|k|ɨ|s|t|æ|n}}

== Template:IPAc-en ==
{{nowrap|{{#ifeq:{{{1|}}}|@||[[Image:Speakerlink.svg|11px|link=Speakerlink.svg|L
isten]]<sup><span style="color: #00e; font: bold 80% sans-serif; padding: 0 
.1em;" class="IPA">[[:File:{{{1|}}}|i]]</span></sup> 
}}{{#if:{{{2|}}}|{{#ifexist: 
Media:{{{2|}}}|{{#ifeq:{{{2|}}}|@||[[Image:Speakerlink.svg|11px|link=Speakerlink
.svg|Listen]]<sup><span style="color: #00e; font: bold 80% sans-serif; padding: 
0 .1em;" class="IPA">[[:File:{{{2|}}}|i]]</span></sup> 
}}}}}}{{#if:{{{3|}}}|{{#ifexist: 
Media:{{{3|}}}|{{#ifeq:{{{3|}}}|@||[[Image:Speakerlink.svg|11px|link=Speakerlink
.svg|Listen]]<sup><span style="color: #00e; font: bold 80% sans-serif; padding: 
0 .1em;" class="IPA">[[:File:{{{3|}}}|i]]</span></sup> }}}}}}}}

== Template:nowrap ==
<span style="white-space:nowrap;">{{{1}}}</span>

What is the expected output? What do you see instead?
The content of the {{nowrap|content}} transclusion should be wrapped inside the 
span of the nowrap template but it seems that the "span" and the started "p" is 
closed too early:
== generated source (excerpt) ==
<span style="white-space: nowrap;"></span></p><div style="width: 11px;"><a 
class="internal" href="/scalaris-wiki/wiki?title=Speakerlink.svg" 
title="Listen"><img 
src="/scalaris-wiki/wiki?get_image=11px-Speakerlink.svg.png" alt="Listen" 
title="Listen" class="location-none" width="11">
</a></div>
=====

What version of the product are you using? On what operating system?
3.0.19-SNAPSHOT

Original issue reported on code.google.com by nico.kru...@googlemail.com on 4 Jul 2012 at 10:19

GoogleCodeExporter commented 8 years ago
actually, the nowrap-span is only part of the problem...
a minor change to reduce complexity:
== Template:IPAc-en ==
{{nowrap|{{#ifeq:{{{1|}}}|@||[[Image:Speakerlink.png|11px|link=Speakerlink.png|L
isten]]<sup><span style="color: #00e; font: bold 80% sans-serif; padding: 0 
.1em;" class="IPA">[[:File:{{{1|}}}|i]]</span></sup> 
}}{{#if:{{{2|}}}|{{#ifeq:{{{2|}}}|@||[[Image:Speakerlink.png|11px|link=Speakerli
nk.png|Listen]]<sup><span style="color: #00e; font: bold 80% sans-serif; 
padding: 0 .1em;" class="IPA">[[:File:{{{2|}}}|i]]</span></sup> 
}}}}{{#if:{{{3|}}}|{{#ifeq:{{{3|}}}|@||[[Image:Speakerlink.png|11px|link=Speaker
link.png|Listen]]<sup><span style="color: #00e; font: bold 80% sans-serif; 
padding: 0 .1em;" class="IPA">[[:File:{{{3|}}}|i]]</span></sup> }}}}}}
=====

the following render results can be seen...
===== MediaWiki 1.17 ===== 
Pakistan (<span style="white-space: nowrap;"><a 
href="/%7Enico/mediawiki/index.php5/Speakerlink.png" title="Listen"><img 
alt="Listen" 
src="/%7Enico/mediawiki/images/thumb/d/dd/Speakerlink.png/11px-Speakerlink.png" 
height="18" width="11"></a><sup><span style="color: rgb(0, 0, 238); font: bold 
80% sans-serif; padding: 0px 0.1em;" class="IPA"><a 
href="/%7Enico/mediawiki/index.php5?title=File:En-us-Pakistan.ogg&action=edit&re
dlink=1" class="new" title="File:En-us-Pakistan.ogg (page does not 
exist)">i</a></span></sup><a 
href="/%7Enico/mediawiki/index.php5/Speakerlink.png" title="Listen"><img 
alt="Listen" 
src="/%7Enico/mediawiki/images/thumb/d/dd/Speakerlink.png/11px-Speakerlink.png" 
height="18" width="11"></a><sup><span style="color: rgb(0, 0, 238); font: bold 
80% sans-serif; padding: 0px 0.1em;" class="IPA"><a 
href="/%7Enico/mediawiki/index.php5?title=File:%CB%88&action=edit&redlink=1" 
class="new" title="File:ˈ (page does not exist)">i</a></span></sup><a 
href="/%7Enico/mediawiki/index.php5/Speakerlink.png" title="Listen"><img 
alt="Listen" 
src="/%7Enico/mediawiki/images/thumb/d/dd/Speakerlink.png/11px-Speakerlink.png" 
height="18" width="11"></a><sup><span style="color: rgb(0, 0, 238); font: bold 
80% sans-serif; padding: 0px 0.1em;" class="IPA"><a 
href="/%7Enico/mediawiki/index.php5?title=File:P&action=edit&redlink=1" 
class="new" title="File:P (page does not exist)">i</a>
=====
===== bliki 3.0.19-SNAPSHOT =====
<p>Pakistan (<span style="white-space: nowrap;"></span></p><div style="width: 
11px;"><a class="internal" href="/scalaris-wiki/wiki?title=Speakerlink.png" 
title="Listen"><img 
src="/scalaris-wiki/wiki?get_image=11px-Speakerlink.png.png" alt="Listen" 
title="Listen" class="location-none" width="11">
</a></div>
<sup><span class="IPA" style="color: rgb(0, 0, 238); font: bold 80% sans-serif; 
padding: 0px 0.1em;"><a class="new" 
href="/scalaris-wiki/wiki?title=File%3AEn-us-Pakistan.ogg" 
title="File:En-us-Pakistan.ogg">i</a></span></sup><div style="width: 11px;"><a 
class="internal" href="/scalaris-wiki/wiki?title=Speakerlink.png" 
title="Listen"><img 
src="/scalaris-wiki/wiki?get_image=11px-Speakerlink.png.png" alt="Listen" 
title="Listen" class="location-none" width="11">
</a></div>
<sup><span class="IPA" style="color: rgb(0, 0, 238); font: bold 80% sans-serif; 
padding: 0px 0.1em;"><a class="new" 
href="/scalaris-wiki/wiki?title=File%3A%CB%88" 
title="File:ˈ">i</a></span></sup><div style="width: 11px;"><a class="internal" 
href="/scalaris-wiki/wiki?title=Speakerlink.png" title="Listen"><img 
src="/scalaris-wiki/wiki?get_image=11px-Speakerlink.png.png" alt="Listen" 
title="Listen" class="location-none" width="11">
</a></div>
<sup><span class="IPA" style="color: rgb(0, 0, 238); font: bold 80% sans-serif; 
padding: 0px 0.1em;"><a class="new" href="/scalaris-wiki/wiki?title=File%3Ap" 
title="File:p">i</a></span></sup><p></p>
=====

Internal links seem to be wrapped with a "div" around the "a" but instead the 
width attribute should be added to the "img" and no "div" should be created.
Maybe fixing this is enough to fix my initial problem since 
"{{nowrap|<span>test</span> <span>test2</span>}}" renders just fine as:
=====
<span style="white-space: nowrap;"><span>test</span> <span>test2</span></span>
=====

Original comment by nico.kru...@googlemail.com on 4 Jul 2012 at 12:25

GoogleCodeExporter commented 8 years ago
With the commit r5833 I only changed the "image rendering".
Could you please check, ig this already solves your problem?

Original comment by axelclk@gmail.com on 4 Jul 2012 at 5:52

GoogleCodeExporter commented 8 years ago
yes, this change seems to solve it - the paragraph is now closed at the right 
place and no line breaks appear in the rendered code
(if you can, you should probably change the issue title though since my first 
suspect was not the one causing the issue)

Original comment by nico.kru...@googlemail.com on 5 Jul 2012 at 9:27

GoogleCodeExporter commented 8 years ago

Original comment by axelclk@gmail.com on 5 Jul 2012 at 4:41

GoogleCodeExporter commented 8 years ago

Original comment by axelclk@gmail.com on 9 Jul 2012 at 6:00