Index: trunk/extensions/wikihiero/tests.txt |
— | — | @@ -81,3 +81,13 @@ |
82 | 82 | <table class='mw-hiero-table mw-hiero-outer' dir='ltr'><tr><td> <table class="mw-hiero-table"><tr> <td><img style='margin:1px;' height='38' src='/extensions/wikihiero/img/hiero_A1.png' title='A1' alt='A1' /></td><td><table class="mw-hiero-table" style="width: 44px;"><tr><td> </td></tr></table></td><td><img style='margin:1px;' height='38' src='/extensions/wikihiero/img/hiero_B1.png' title='B1' alt='B1' /></td><td><table class="mw-hiero-table" style="width: 22px;"><tr><td> </td></tr></table></td><td><img style='margin:1px;' height='38' src='/extensions/wikihiero/img/hiero_C1.png' title='C1' alt='C1' /></td></tr></table> </td></tr></table> |
83 | 83 | |
84 | 84 | !! end |
| 85 | + |
| 86 | +!! test |
| 87 | +WikiHiero - HTML comments |
| 88 | +!! input |
| 89 | +<hiero>A1<!-- B1 --> C1 D<!-- |
| 90 | +fooooo -->1</hiero> |
| 91 | +!! result |
| 92 | +<table class='mw-hiero-table mw-hiero-outer' dir='ltr'><tr><td> <table class="mw-hiero-table"><tr> <td><img style='margin:1px;' height='38' src='/extensions/wikihiero/img/hiero_A1.png' title='A1' alt='A1' /></td><td><img style='margin:1px;' height='38' src='/extensions/wikihiero/img/hiero_C1.png' title='C1' alt='C1' /></td><td><img style='margin:1px;' height='19' src='/extensions/wikihiero/img/hiero_D1.png' title='D1' alt='D1' /></td></tr></table> </td></tr></table> |
| 93 | + |
| 94 | +!! end |
Index: trunk/extensions/wikihiero/wikihiero.body.php |
— | — | @@ -410,10 +410,10 @@ |
411 | 411 | $this->currentBlock = array(); |
412 | 412 | $this->token = ''; |
413 | 413 | |
414 | | - $text = preg_replace( '/<!--.*?-->/', '', $this->text ); // remove HTML comments |
| 414 | + $text = preg_replace( '/\\<!--.*?--\\>/s', '', $this->text ); // remove HTML comments |
415 | 415 | |
416 | 416 | for ( $i = 0; $i < strlen( $text ); $i++ ) { |
417 | | - $char = $this->text[$i]; |
| 417 | + $char = $text[$i]; |
418 | 418 | |
419 | 419 | if ( isset( self::$delimiters[$char] ) ) { |
420 | 420 | $this->newBlock(); |