1
0

Fix orphaned categories, textile plugin, smarty commentform function

This commit is contained in:
Garvin Hicking
2006-08-27 11:29:00 +00:00
parent de2f7fe707
commit 0fa785d1a6
5 changed files with 109 additions and 22 deletions

View File

@ -22,7 +22,7 @@ class serendipity_event_textile extends serendipity_event
$propbag->add('description', PLUGIN_EVENT_TEXTILE_DESC);
$propbag->add('stackable', false);
$propbag->add('author', 'Serendipity Team');
$propbag->add('version', '1.2');
$propbag->add('version', '1.3');
$propbag->add('requirements', array(
'serendipity' => '0.8',
'smarty' => '2.6.7',
@ -228,4 +228,3 @@ class serendipity_event_textile extends serendipity_event
}
/* vim: set sts=4 ts=4 expandtab : */
?>

View File

@ -168,6 +168,9 @@ Applying Attributes:
*/
function myglobals() {
global $textile_hlgn, $textile_vlgn, $textile_clas, $textile_lnge, $textile_styl,
$textile_cspn, $textile_rspn, $textile_a, $textile_s, $textile_c, $textile_pnct;
$textile_hlgn = "(?:\<(?!>)|(?<!<)\>|\<\>|\=|[()]+)";
$textile_vlgn = "[\-^~]";
$textile_clas = "(?:\([^)]+\))";
@ -179,6 +182,9 @@ Applying Attributes:
$textile_s = "(?:$textile_cspn?$textile_rspn?|$textile_rspn?$textile_cspn?)";
$textile_c = "(?:$textile_clas?$textile_styl?$textile_lnge?|$textile_styl?$textile_lnge?$textile_clas?|$textile_lnge?$textile_styl?$textile_clas?)";
$textile_pnct = '[\!"#\$%&\'()\*\+,\-\./:;<=>\?@\[\\\]\^_`{\|}\~]';
}
myglobals();
function textile($text,$lite='') {
@ -299,7 +305,7 @@ Applying Attributes:
foreach(preg_split("/\|$/m",$matches[2],-1,PREG_SPLIT_NO_EMPTY) as $row){
if (preg_match("/^($textile_a$textile_c\. )(.*)/m",$row,$rmtch)) {
$ratts = pba($rmtch[1],'tr');
$ratts = textile_pba($rmtch[1],'tr');
$row = $rmtch[2];
} else $ratts = '';
@ -307,7 +313,7 @@ Applying Attributes:
$textile_ctyp = "d";
if (preg_match("/^_/",$textile_cell)) $textile_ctyp = "h";
if (preg_match("/^(_?$textile_s$textile_a$textile_c\. )(.*)/",$textile_cell,$textile_cmtch)) {
$textile_catts = pba($textile_cmtch[1],'td');
$textile_catts = textile_pba($textile_cmtch[1],'td');
$textile_cell = $textile_cmtch[2];
} else $textile_catts = '';