Skip to content

Commit

Permalink
upgrade to Creole 1.0 specs
Browse files Browse the repository at this point in the history
git-svn-id: https://svn.php.net/repository/pear/packages/Text_Wiki/trunk@240476 c90b9560-bf6c-de11-be94-00142212c4b1
  • Loading branch information
Michele Tomaiuolo committed Jul 30, 2007
1 parent 3588e17 commit 8f37ef2
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 7 deletions.
2 changes: 1 addition & 1 deletion Text/Wiki/Parse/Creole/Center.php
Expand Up @@ -38,7 +38,7 @@ class Text_Wiki_Parse_Center extends Text_Wiki_Parse {
*
*/

var $regex = '/\n\n\|(.*?)\n\n/';
var $regex = '/^! *(.*?)$/m';

/**
*
Expand Down
3 changes: 2 additions & 1 deletion Text/Wiki/Parse/Creole/Image.php
Expand Up @@ -32,7 +32,7 @@ class Text_Wiki_Parse_Image extends Text_Wiki_Parse {
*
*/

var $regex = '/{{ *(.*)(\ *| *(.*))? *}}/U';
var $regex = '/{{(.*)(\|(.*))?}}/U';


/**
Expand All @@ -50,6 +50,7 @@ class Text_Wiki_Parse_Image extends Text_Wiki_Parse {
function process(&$matches)
{
$src = trim($matches[1]);
$src = ltrim($src, '/');
$alt = trim($matches[3]);
if (! $alt) $alt = $src;

Expand Down
5 changes: 0 additions & 5 deletions Text/Wiki/Parse/Creole/Trim.php
Expand Up @@ -63,11 +63,6 @@ function parse()
$replace = "\n\n----\n\n$2";
$this->wiki->source = preg_replace($find, $replace, $this->wiki->source);

// change dash for ndash
$find = "/ \- /";
$replace = " -- ";
$this->wiki->source = preg_replace($find, $replace, $this->wiki->source);

}

}
Expand Down

0 comments on commit 8f37ef2

Please sign in to comment.