Index: trunk/phase3/tests/phpunit/includes/parser/PreprocessorTest.php |
— | — | @@ -82,6 +82,7 @@ |
83 | 83 | array( "{{#if: {{{1|}}} | 1 | {{#if: {{{1|}}} | 2 | 3 }} }}", "<root><template><title>#if: <tplarg><title>1</title><part><name index=\"1\" /><value></value></part></tplarg> </title><part><name index=\"1\" /><value> 1 </value></part><part><name index=\"2\" /><value> <template><title>#if: <tplarg><title>1</title><part><name index=\"1\" /><value></value></part></tplarg> </title><part><name index=\"1\" /><value> 2 </value></part><part><name index=\"2\" /><value> 3 </value></part></template> </value></part></template></root>"), |
84 | 84 | array( "{{ {{Foo}}", "<root>{{ <template><title>Foo</title></template></root>"), |
85 | 85 | array( "{{Foobar {{Foo}} {{Bar}} {{Baz}} ", "<root>{{Foobar <template><title>Foo</title></template> <template><title>Bar</title></template> <template><title>Baz</title></template> </root>"), |
| 86 | + array( "[[Foo]] |", "<root>[[Foo]] |</root>"), |
86 | 87 | /* array( file_get_contents( dirname( __FILE__ ) . '/QuoteQuran.txt' ), file_get_contents( dirname( __FILE__ ) . '/QuoteQuranExpanded.txt' ) ), */ |
87 | 88 | ); |
88 | 89 | } |
— | — | @@ -101,6 +102,7 @@ |
102 | 103 | array( "QuoteQuran" ), # http://en.wikipedia.org/w/index.php?title=Template:QuoteQuran/sandbox&oldid=237348988 GFDL + CC-BY-SA by Striver |
103 | 104 | array( "Factorial" ), # http://en.wikipedia.org/w/index.php?title=Template:Factorial&oldid=98548758 GFDL + CC-BY-SA by Polonium |
104 | 105 | array( "All_system_messages" ), # http://tl.wiktionary.org/w/index.php?title=Suleras:All_system_messages&oldid=2765 GPL text generated by MediaWiki |
| 106 | + array( "Fundraising" ), # http://tl.wiktionary.org/w/index.php?title=MediaWiki:Sitenotice&oldid=5716 GFDL + CC-BY-SA, copied there by Sky Harbor. |
105 | 107 | ); |
106 | 108 | } |
107 | 109 | |
Index: trunk/phase3/tests/parser/preprocess/Fundraising.txt |
— | — | @@ -0,0 +1,17 @@ |
| 2 | +<div name="fundraising" id="fundraising" class="plainlinks" style="margin-top:5px; text-align: center; background-color: #ffffe0; border: solid 1px #e0e0c0"> |
| 3 | +'''Pwede kang [[Wikimedia:give the gift of knowledge|maghandog ng kaalaman]] sa paraan ng [[Wikimedia:Fundraising#Donation_methods|pagbibigay ng donasyon sa Pundasyong Wikimedia!]]''' |
| 4 | +<br /> |
| 5 | +<fundraising/> |
| 6 | + |
| 7 | +<fundraisinglogo/> |
| 8 | +<br /> |
| 9 | +<b>Ngayon, ang iyong [[Wikimedia:Fundraising|kontribusyon]] ay [[Wikimedia:Fundraising FAQ|itatambal]] ng isang anonimong kaibigan.</b> |
| 10 | +<br /> |
| 11 | +<small> |
| 12 | +[[Wikimedia:Deductibility of donations|Pagbabawas sa mga buwis ng donasyon]] |
| 13 | +| |
| 14 | +[[Wikimedia:Fundraising FAQ|FAQ]] |
| 15 | +| |
| 16 | +[http://upload.wikimedia.org/wikipedia/foundation/2/28/Wikimedia_2006_fs.pdf Mga pampananalaping pahayag] |
| 17 | +</small> |
| 18 | +</div> |
Property changes on: trunk/phase3/tests/parser/preprocess/Fundraising.txt |
___________________________________________________________________ |
Added: svn:eol-style |
1 | 19 | + native |
Index: trunk/phase3/tests/parser/preprocess/Fundraising.expected |
— | — | @@ -0,0 +1,18 @@ |
| 2 | +<root><div name="fundraising" id="fundraising" class="plainlinks" style="margin-top:5px; text-align: center; background-color: #ffffe0; border: solid 1px #e0e0c0"> |
| 3 | +'''Pwede kang [[Wikimedia:give the gift of knowledge|maghandog ng kaalaman]] sa paraan ng [[Wikimedia:Fundraising#Donation_methods|pagbibigay ng donasyon sa Pundasyong Wikimedia!]]''' |
| 4 | +<br /> |
| 5 | +<fundraising/> |
| 6 | +&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; |
| 7 | +<fundraisinglogo/> |
| 8 | +<br /> |
| 9 | +<b>Ngayon, ang iyong [[Wikimedia:Fundraising|kontribusyon]] ay [[Wikimedia:Fundraising FAQ|itatambal]] ng isang anonimong kaibigan.</b> |
| 10 | +<br /> |
| 11 | +<small> |
| 12 | +[[Wikimedia:Deductibility of donations|Pagbabawas sa mga buwis ng donasyon]] |
| 13 | +| |
| 14 | +[[Wikimedia:Fundraising FAQ|FAQ]] |
| 15 | +| |
| 16 | +[http://upload.wikimedia.org/wikipedia/foundation/2/28/Wikimedia_2006_fs.pdf Mga pampananalaping pahayag] |
| 17 | +</small> |
| 18 | +</div> |
| 19 | +</root> |
\ No newline at end of file |
Property changes on: trunk/phase3/tests/parser/preprocess/Fundraising.expected |
___________________________________________________________________ |
Added: svn:eol-style |
1 | 20 | + native |
Index: trunk/extensions/NativePreprocessor/preprocesstoobj.c |
— | — | @@ -189,7 +189,7 @@ |
190 | 190 | |
191 | 191 | #define getFlags() \ |
192 | 192 | inHeading = (parentNode->type == heading_node); \ |
193 | | - findPipe = (parentNode->type != heading_node) && (parentNode->type != bracket_node); \ |
| 193 | + findPipe = (parentNode->type != heading_node) && (parentNode->type != bracket_node) && (parentNode->type != root_node); \ |
194 | 194 | findEquals = findPipe && ( parentNode->nextSibling > 0 ) && ( parentNode->type != value_node ); |
195 | 195 | |
196 | 196 | while ( true ) { |