Closed GoogleCodeExporter closed 8 years ago
additionally, content included in <noinclude> tags should always be removed,
even inside includeonly/onlyinclude, see the following example:
===== TestInclude3 =====
{{TestInclude3}}
========================
===== Template:TestInclude3 =====
<includeonly><noinclude>invisible</noinclude>text</includeonly>
========================
this currently renders to "<noinclude>invisible</noinclude>text"
Original comment by nico.kru...@googlemail.com
on 24 Apr 2012 at 8:27
for some (possibly all?) tags, e.g. noinclude, an implicit closing tag is
assumed at the end of the template. In the following example, "invisible"
should not appear on the transcluding page, i.e. TestInclude4:
===== TestInclude4 =====
{{TestInclude4}}
========================
===== Template:TestInclude4 =====
Text <noinclude>invisible
========================
Original comment by nico.kru...@googlemail.com
on 24 Apr 2012 at 8:39
Original comment by axelclk@gmail.com
on 24 Apr 2012 at 8:23
TestInclude4 changed with r4727. This changes the bahaviour of a loto of more
tags.
Original comment by axelclk@gmail.com
on 24 Apr 2012 at 8:48
Tests should work with r4729.
Original comment by axelclk@gmail.com
on 27 Apr 2012 at 9:31
Original comment by axelclk@gmail.com
on 27 Apr 2012 at 9:47
the tests work, thank you
unfortunately I might have expressed myself wrong regarding the removal of
noinclude contents - to quote from the wiki help:
"Anything between <noinclude> and </noinclude> will be processed and displayed
only when the page is being viewed directly; it will not be included or
substituted."
"Text between <includeonly> and </includeonly> will be processed and displayed
only when the page is being included."
Currently, noinclude contents are removed everywhere but should be retained if
getRecursionLevel() == 0, e.g. if the template (or transcluded page) is
rendered directly.
===== TestIncludeMain5 =====
{{TestInclude5}}
--------------
{{:TestInclude5}}
========================
===== Template:TestInclude5 =====
test1<noinclude> noincludetext</noinclude>
<includeonly>includeonlytext<noinclude> noincludetext</noinclude></includeonly>
========================
===== TestInclude5 =====
test1<noinclude> noincludetext</noinclude>
<includeonly>includeonlytext<noinclude> noincludetext</noinclude></includeonly>
========================
Rendering TestIncludeMain5 correctly shows
========================
<p>test1
</p>
<p>includeonlytext
</p>
<hr>
<p>test1
</p>
<p>includeonlytext</p>
========================
but rendering either Template:TestInclude5 or TestInclude5 should show
========================
<p>test1 noincludetext</p>
========================
instead of
========================
<p>test1
</p>
<p>includeonlytext</p>
========================
Original comment by nico.kru...@googlemail.com
on 30 Apr 2012 at 9:35
the whole thing gets more complex with <onlyinclude>:
"With <onlyinclude>wikitext</onlyinclude> on a page, the display of the
wikitext so surrounded and the rest of the page (except includeonly parts) is
rendered on the page itself normally.[...]
However, in transclusion, the page gives only the parts within onlyinclude
blocks."
The onlyinclude demo page will probably be a good test:
https://meta.wikimedia.org/wiki/Help:Template/onlyinclude_demo
Original comment by nico.kru...@googlemail.com
on 30 Apr 2012 at 9:38
Improved with r4867
Original comment by axelclk@gmail.com
on 30 Apr 2012 at 1:53
Added r4868.
Extended the IWikiModel#render() method with a boolean parameter which
indicates, if the text should be rendered directly in template topic mode.
Original comment by axelclk@gmail.com
on 1 May 2012 at 8:26
FYI,
in AbstractWikiModel this causes infinite loop/stack overflow
public String render(ITextConverter converter, String rawWikiText) {
return render(converter, rawWikiText);
}
I think this should be
public String render(ITextConverter converter, String rawWikiText) {
return render(converter, rawWikiText, false);
}
Original comment by dfi...@itmatter.com
on 2 May 2012 at 1:25
Yes you right, i changed with r4933.
Original comment by axelclk@gmail.com
on 2 May 2012 at 6:31
Commited r4998.
Fixed a bug in info.bliki.wiki.filter.Util#indexOfNestedIgnoreCase()
Original comment by axelclk@gmail.com
on 9 May 2012 at 8:17
Original comment by axelclk@gmail.com
on 3 Jun 2012 at 10:54
Original comment by axelclk@gmail.com
on 3 Jul 2012 at 5:43
Original issue reported on code.google.com by
nico.kru...@googlemail.com
on 24 Apr 2012 at 8:24