Commit 372fe618e6576ae4343036d3d5fbdb7d79d58d60

'strict' mode removed from tests. Bug fixed: image with no alternative text is rendered properly now.
creole.php
(1 / 2)
  
415415 ),
416416
417417 'img' => new creole_rule_image(array(
418 'regex' => '/\{\{((?!\{)[^|}\n]*(?:}(?!})[^|}\n]*)*)\|' .
419 '([^}~\n]*((}(?!})|~.)[^}~\n]*)*)}}/'
418 'regex' => '/' . $rx['image'] . '/',
420419 )),
421420
422421 'escaped_sequence' => array(
t/creole.php
(0 / 19)
  
539539 'output' => '<table><tr><td> <img src="image.png" alt="Alternative text"/> </td></tr></table>'
540540 ),
541541 array(
542 'name' => "Image in table (strict)",
543 'input' => "| {{image.png|Alternative text}} |",
544 'output' => '<table><tr><td> {{image.png</td><td>Alternative text}} </td></tr></table>',
545 'options' => array( 'strict' => true )
546 ),
547 array(
548542 'name' => "Image in named link in table",
549543 'input' => "| [[Link|{{image.png|Alternative text}}]] |",
550544 'output' => '<table><tr><td> <a href="/wiki/Link"><img src="image.png" alt="Alternative text"/></a> </td></tr></table>'
549549 'output' => '<p><img src="image.png" alt=""/></p>'
550550 ),
551551 array(
552 'name' => "Image without alternative text (strict)",
553 'input' => "{{image.png}}",
554 'output' => '<p>{{image.png}}</p>',
555 'options' => array( 'strict' => true )
556 ),
557 array(
558552 'name' => "Image with empty alternative text",
559553 'input' => "{{image.png|}}",
560554 'output' => '<p><img src="image.png" alt=""/></p>',
561 'options' => array( 'strict' => true )
562555 ),
563 array(
564 'name' => "Image with custom default alternative text",
565 'input' => "{{image.png}}",
566 'output' => '<p><img src="image.png" alt="Image"/></p>',
567 'options' => array( 'default_image_text' => 'Image' )
568 )
569556);
570557
571558plan(count($array));