From: <Cra...@nt...> - 2005-07-19 12:26:41
|
Author: CrawfordCurrie Date: 2005-07-19 18:56:59 -0700 (Tue, 19 Jul 2005) New Revision: 4669 Modified: twiki/branches/DEVELOP/lib/TWiki/Plugins/PreferencesPlugin.pm Log: Item120: made preferences plugin handle three-spaces at the start of 'Set' lines Modified: twiki/branches/DEVELOP/lib/TWiki/Plugins/PreferencesPlugin.pm =================================================================== --- twiki/branches/DEVELOP/lib/TWiki/Plugins/PreferencesPlugin.pm 2005-07-20 01:38:55 UTC (rev 4668) +++ twiki/branches/DEVELOP/lib/TWiki/Plugins/PreferencesPlugin.pm 2005-07-20 01:56:59 UTC (rev 4669) @@ -70,7 +70,7 @@ if ( $action eq 'edit' ) { TWiki::Func::setTopicEditLock( $web, $topic, 1 ); - $_[0] =~ s(^(\t+\*\sSet\s)(\w+)\s\=(.*$(\n[ \t]+[^\s*].*$)*)) + $_[0] =~ s(^((?:\t| )+\*\sSet\s)(\w+)\s\=(.*$(\n[ \t]+[^\s*].*$)*)) ($1._generateEditField($web, $topic, $2, $3, $formDef))gem; $_[0] =~ s(%EDITPREFERENCES.*%) (_generateButtons($web, $topic, 0))eo; @@ -84,7 +84,7 @@ } elsif ( $action eq 'save' ) { my $text = TWiki::Func::readTopicText( $web, $topic ); - $text =~ s(^(\t+\*\sSet\s)(\w+)\s\=(.*)$) + $text =~ s(^((?:\t| )+\*\sSet\s)(\w+)\s\=(.*)$) ($1._saveSet($web, $topic, $2, $3, $formDef))mgeo; my $error = TWiki::Func::saveTopicText( $web, $topic, $text, '' ); |