Index: trunk/phase3/tests/phpunit/includes/parser/PreprocessorTest.php |
— | — | @@ -35,6 +35,8 @@ |
36 | 36 | array( "<foo> <gallery></gallery>", "<root><foo> <ext><name>gallery</name><attr></attr><inner></inner><close></gallery></close></ext></root>" ), |
37 | 37 | array( "<foo> <gallery><gallery></gallery>", "<root><foo> <ext><name>gallery</name><attr></attr><inner><gallery></inner><close></gallery></close></ext></root>" ), |
38 | 38 | array( "<noinclude> Foo bar </noinclude>", "<root><ignore><noinclude></ignore> Foo bar <ignore></noinclude></ignore></root>" ), |
| 39 | + array( "<noinclude>\n{{Foo}}\n</noinclude>", "<root><ignore><noinclude></ignore>\n<template lineStart=\"1\"><title>Foo</title></template>\n<ignore></noinclude></ignore></root>" ), |
| 40 | + array( "<noinclude>\n{{Foo}}\n</noinclude>\n", "<root><ignore><noinclude></ignore>\n<template lineStart=\"1\"><title>Foo</title></template>\n<ignore></noinclude></ignore>\n</root>" ), |
39 | 41 | array( "<gallery>foo bar", "<root><ext><name>gallery</name><attr></attr><inner>foo bar</inner></ext></root>" ), |
40 | 42 | array( "<gallery></gallery</gallery>", "<root><ext><name>gallery</name><attr></attr><inner></gallery</inner><close></gallery></close></ext></root>" ), |
41 | 43 | array( "=== Foo === ", "<root><h level=\"3\" i=\"1\">=== Foo === </h></root>" ), |
Index: trunk/extensions/NativePreprocessor/tag_util.c |
— | — | @@ -79,6 +79,11 @@ |
80 | 80 | if ( string[0] == '/' ) { |
81 | 81 | string++; |
82 | 82 | string_len--; |
| 83 | + |
| 84 | + if ( i ) { |
| 85 | + memmove( lowername, lowername + 1, i - 1 ); |
| 86 | + i--; |
| 87 | + } |
83 | 88 | } |
84 | 89 | continue; |
85 | 90 | } |