mediawiki-extensions-Cite/citeCatTreeParserTests.txt
Brad Jorsch e6c76b5d23 (bug 13073) Work around Tidy confusion
If the <references> tag is wrapped (e.g. <div><references></div>) and
the first ref on the page contains a newline, Tidy will get confused and
insert extra paragraph breaks in the output.

We can avoid this easily enough by inserting a newline between
MediaWiki:cite_references_prefix and the first reference's <li>.

Note since this changes the output we also have to adjust the parser
tests to expect the new output.

Change-Id: I8222d53eaf2b20f842915fe90af724711a20bfc5
2012-11-26 19:29:03 +01:00

28 lines
1.3 KiB
Plaintext
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# Force the test runner to ensure the extension is loaded
!! hooks
ref
references
categorytree
!! endhooks
!! test
Bug 20748 - <references /> doesn't work after category tree in some cases
!! input
<ref>ref</ref>
<categorytree showcount=on>Articles tagged for deletion and rescue</categorytree>
<references />
!! result
<p><sup id="cite_ref-0" class="reference"><a href="#cite_note-0">[1]</a></sup>
</p>
<div class="CategoryTreeTag" data-ct-mode="0" data-ct-options="{&quot;mode&quot;:0,&quot;hideprefix&quot;:20,&quot;showcount&quot;:true,&quot;namespaces&quot;:false}"><div class="CategoryTreeSection"><div class="CategoryTreeItem"><span class="CategoryTreeEmptyBullet">[<b>×</b>] </span> <a class="CategoryTreeLabel CategoryTreeLabelNs14 new CategoryTreeLabelCategory" href="/index.php?title=Category:Articles_tagged_for_deletion_and_rescue&amp;action=edit&amp;redlink=1">Articles tagged for deletion and rescue</a> <span title="Contains 0 subcategories, 0 pages, and 0 files" dir="ltr">(empty)</span></div>
<div class="CategoryTreeChildren" style="display:block"><i class="CategoryTreeNotice">no subcategories</i></div></div>
</div>
<ol class="references">
<li id="cite_note-0"><span class="mw-cite-backlink"><a href="#cite_ref-0">↑</a></span> <span class="reference-text">ref</span>
</li>
</ol>
!! end